Collision detection is simply not functioning properly after following a tutorial.
by David Croach · in Torque Game Builder · 11/13/2009 (3:25 am) · 0 replies
So, for my first TGB venture, I followed this tutorial: http://tdn.garagegames.com/wiki/TGB/MiniPlatformerTutorial
All started well, and it certainly taught me a great deal, however it seems like my collision detection simply isn't functioning properly. For some reason, when on the ground or moving left or right into a wall, my character "bounces" on the point of collision. So when he's resting on the ground, he's really bouncing up and down over and over.
My collision is set to Polygon, and it's set to CLAMP, so in theory, it should just rest there. I've followed the tutorial to a T and have even done it multiple times to eliminate human error. What's more is a friend of mine is doing the exact same tutorial and having the same problem.
The reason this is bad (besides the fact that it looks so funky) is that when it's on the "up" bounce, it's technically not colliding anymore, so Jump doesn't work for that frame.
Oddly enough, whenever I set the collision box to Circle, the problem completely fixes itself, although my square character ends up with a circle for a hitbox, which is obviously not what I want.
It's simply frustrating, and extremely confusing. If anyone has any answers, it would be greatly appreciated.
~Dac
Dacvak089[at]gmail.com
All started well, and it certainly taught me a great deal, however it seems like my collision detection simply isn't functioning properly. For some reason, when on the ground or moving left or right into a wall, my character "bounces" on the point of collision. So when he's resting on the ground, he's really bouncing up and down over and over.
My collision is set to Polygon, and it's set to CLAMP, so in theory, it should just rest there. I've followed the tutorial to a T and have even done it multiple times to eliminate human error. What's more is a friend of mine is doing the exact same tutorial and having the same problem.
The reason this is bad (besides the fact that it looks so funky) is that when it's on the "up" bounce, it's technically not colliding anymore, so Jump doesn't work for that frame.
Oddly enough, whenever I set the collision box to Circle, the problem completely fixes itself, although my square character ends up with a circle for a hitbox, which is obviously not what I want.
It's simply frustrating, and extremely confusing. If anyone has any answers, it would be greatly appreciated.
~Dac
Dacvak089[at]gmail.com
About the author