Was thinking about setting up my own pure custom platform movement without using any behaviors, and I was wondering what would be the best way to go about the fall, and walking, etc.
I would want to use states so that I could simulate timescale, as well as something like a turn based system.
My initial thoughts for a fall were:
player pv= falling
player set y to .y+n*td
But you would of course need a way to stop it.
I can either add an event to the fall set, something like:
+player pv= falling
-+player overlaps at offset family ground -1 player set pv to onground
--+player set y to .y+n*td
or
+player pv= falling
-+player (negated)overlaps at offset family ground -1
--+player set y to .y+n*td
But that still leaves room for errors as you could go past the offset point quite easily.
Any thoughts on how to avoid that issue?
I did a bit of research into this, came up with the following -
1, Couple of tutorials which include all the math needed to do it-
http://dl.dropbox.com/u/22173473/Collisions.rar
( i'm still trying to decipher it)
2, monsharen made some examples with C2, using the theory and they work!
http://www.lionsinvests.com/scirra/physics/physics.capx
http://www.lionsinvests.com/scirra/platformphysics/
http://www.lionsinvests.com/scirra/platformphysics/platform_physics.capx