Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / CreatePhysicsForce question

Author
Message
Dud
13
Years of Service
User Offline
Joined: 21st Oct 2011
Location:
Posted: 26th Oct 2011 13:09
Hi all,

I'm playing with the CreatePhysicsForce command which seems to apply the force in all directions.

Is it possible to apply a force in a certain direction only? For example I'm thinking of something like a hoover that could suck objects in from one direction.

Cheers,
Dud
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2011 15:16 Edited at: 26th Oct 2011 15:29
You might have to use commands such as "SetSpritePhysicsForce( iSpriteIndex, x, y, vx, vy )" and manually check when sprites are in 'range' of your "hoover". There are no commands for this yet.

Perhaps you could suggest them as enhancements on the "Bug Report" page?

I imagine something like this might be nice:
forceID = createPhysicsDirectionForce(x#, y#, angle#, width#, range#)

Nevermind I'll do it...

EDIT: added here: Issue 118

Dud
13
Years of Service
User Offline
Joined: 21st Oct 2011
Location:
Posted: 26th Oct 2011 16:26
Hey thanks for posting it as a suggested enhancement, in the meantime I'll try coming up with my own method.

Cheers,
Dud

Login to post a reply

Server time is: 2024-11-22 10:38:03
Your offset time is: 2024-11-22 10:38:03