PDA

View Full Version : [AS3] Any good physics tutorials??



flashmxboy
June 30th, 2009, 10:26 AM
Hi...

I`m currently working on a platformer and i want to implement some kind of physics. (Like real gravity, bouncing balls, proper jumping etc.)(-:

Do any of you know about some good tutorials to get me started on this??

(I know i could implement some kind of physics engine but...BAh. I want to learn something:P)

BoppreH
June 30th, 2009, 11:46 AM
I'm looking for a realistic car friction system :P

I'm tired of "speed -= speed * FRICTION" and constant drifting when the friction is low.

flashmxboy
June 30th, 2009, 11:57 AM
Mabye you`re looking for something like this? (Not my work)

Drift Physics (http://board.flashkit.com/board/showthread.php?t=664019)
Source File (http://board.flashkit.com/board/showthread.php?t=688426)

Hope it helps:D

Anyway...i still got my problem:P

TOdorus
June 30th, 2009, 07:57 PM
@ Boppreh, this was on not that long ago. Search!

http://www.kirupa.com/forum/showthread.php?t=328817

@ flashmxboy

http://chrishecker.com/Rigid_Body_Dynamics

dandylion13
July 1st, 2009, 12:19 PM
I'm tired of "speed -= speed * FRICTION" and constant drifting when the friction is low.

Hi,

You need to force the speed to zero once it falls below a certain threshold. This is because of Xeno's paradox.. your calculation above will never reach zero, and so you get that "drift" effect. There is a book called "Foundation Game Design" which covers all of these issues in detail, including how to build a platformer with physics in AS3.0.

TOdorus
July 1st, 2009, 01:44 PM
Hi,

You need to force the speed to zero once it falls below a certain threshold. This is because of Xeno's paradox.. your calculation above will never reach zero, and so you get that "drift" effect.

http://en.wikipedia.org/wiki/Round-off_error

Boppreh how does it follow from that formula that it would drift? Isn't drifting the breaking out of the front, hind or all wheels? Your formula only shows how fast a body would come to a stop. You'd need direction for drifting.