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.

iOS and MacOS / PhysicsDamping is not working

Author
Message
Subbir
11
Years of Service
User Offline
Joined: 20th Jun 2012
Location:
Posted: 12th Sep 2012 08:31
agk::SetSpritePhysicsDamping(104, 5); is not working in my simulator or either in my device. sprite 104 is an existing sprite, but this function doesnt damp any velocity. What should I do?

Subbir Rahman
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 17th Sep 2012 17:40
We would need to see more code than just the one line.

And, what do you mean when you say that the velocity isn't damped?

Using a value of 5 is pretty high.

For instance, are you using the SetSpritePhysics command on sprite 104 before you use the SetSpritePhysicsDamping? How are you applying motion to the sprite?

Cheers,
Ancient Lady
AGK Community Tester
Subbir
11
Years of Service
User Offline
Joined: 20th Jun 2012
Location:
Posted: 3rd Oct 2012 12:17
Thanks for the response. I got it right now. I had 3collision sprite where i needed toe damp. It was within the do loop. It cant damp if another one is damping. I set a flag, and then it works.

Subbir Rahman
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Oct 2012 16:51
Glad to hear you have it working.

Happy Programming!

Cheers,
Ancient Lady
AGK Community Tester

Login to post a reply

Server time is: 2024-04-26 16:17:38
Your offset time is: 2024-04-26 16:17:38