#19633 - dagamer34 - Fri Apr 23, 2004 12:42 am
I have been working on tile-sprite collision for a while and have finally gotten it to respond to collision nicely. The only problem is that my collision detection system isn't accurate enough.
I have my algorithm check 4 corners of a sprite against the tiles, and the middle borders of the sprite. Collision is almost accurate, but sometimes it fails because it misses parts of the sprite.
To show you what I mean, run my little demo.
www.geocities.com/dagamer34/ColTest.zip
Press B to run and jump higher (when running). Now, if you get to the left box, and decide to walk off the box to the right, you get stuck when you should be falling down. My algorithm is accurate only for a small sprite, but since I only check 3 times on each side, mishaps occur.
My question is, is there a better way to check collision besides tracing all along the sprite itself?
_________________
Little kids and Playstation 2's don't mix. :(
I have my algorithm check 4 corners of a sprite against the tiles, and the middle borders of the sprite. Collision is almost accurate, but sometimes it fails because it misses parts of the sprite.
To show you what I mean, run my little demo.
www.geocities.com/dagamer34/ColTest.zip
Press B to run and jump higher (when running). Now, if you get to the left box, and decide to walk off the box to the right, you get stuck when you should be falling down. My algorithm is accurate only for a small sprite, but since I only check 3 times on each side, mishaps occur.
My question is, is there a better way to check collision besides tracing all along the sprite itself?
_________________
Little kids and Playstation 2's don't mix. :(