Help with platform collision
by Pete111 · in Torque Game Builder · 03/17/2005 (8:00 am) · 5 replies
I'm trying to figure out the best way to have a character stand on a platform without constant gravity pulling it through the platform.
If I have a constant polor force pulling down I can test for a collision on the bottom normal and then set the sprite's vertical velocity to zero but the constant grav keeps pulling sprite through the tile!
Do I need to run a per frame conditional to see if gravity should be applied?
If I have a constant polor force pulling down I can test for a collision on the bottom normal and then set the sprite's vertical velocity to zero but the constant grav keeps pulling sprite through the tile!
Do I need to run a per frame conditional to see if gravity should be applied?
About the author
#2
imagine gravity working fine and then landing on flypaper...
03/17/2005 (8:50 am)
I've tried but when the player lands on a tile I cant seem to get any constant horizontal velocity going. The left and right velocities keep getting knocked out when it reads the collision at my feet...imagine gravity working fine and then landing on flypaper...
#3
EDIT: Try looking at other people's examples here on the forums.
03/17/2005 (8:57 am)
Check your collision material for your player. You may need to mess with the damping or friction.EDIT: Try looking at other people's examples here on the forums.
#4
http://www.garagegames.com/mg/forums/result.thread.php?qt=26526
03/17/2005 (9:48 am)
I don't know if TD2 physics can quite do a platformer out of the box yet. Its really close, but there are a couple of quirks. If you try out this work around it will solve most of your problems.http://www.garagegames.com/mg/forums/result.thread.php?qt=26526
#5
03/17/2005 (10:17 am)
Yes I've noticed - thanks for the help Ray.
Torque Owner Matt Van Gorkom