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 / most elegant way to use physics to do 'powerups' without stopping char from collision?

Author
Message
erebusman
13
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 18th Feb 2013 04:42
Hello,

Working on my most recent game and I have a question..

What is the most elegant way when using the built in physics system to have my character collide with something (a health power up, a coin etc) but *not* have the physics system stop my character from the impact?

Basically I want to use physics to detect the collision and then 'pick up' the item without stopping my character at all. I want them to keep moving as if they had not hit something?

Thoughts?

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Feb 2013 06:18 Edited at: 18th Feb 2013 22:27
DOH! I must have been tired



Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 18th Feb 2013 08:08
SetSpritePhysicsIsSensor
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 18th Feb 2013 08:31
Markus has the solution I would recommend


this.mess = abs(sin(times#))
erebusman
13
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 18th Feb 2013 22:25
Oh interesting ... Never even looked at that one , thanks for the suggestion I will try it out!

erebusman
13
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 19th Feb 2013 04:30
And now that I'm at home and have tested this out, works brilliantly!

@ Markus : Thank you very much!

Login to post a reply

Server time is: 2024-11-24 08:04:43
Your offset time is: 2024-11-24 08:04:43