Collision Detection

Started by
19 comments, last by jolyqr 18 years ago
that's very small. hope you can see something.

If i go forward (on the direction of the red arrow). The collision is detected, the player (blue cube) responds by going backward (by following the green arrow).

Now if I go forward and if at the same time I press the right direction (by following the black arrow), the collision is detected as well, but it’s detected on the right side (not forward). Therefore the player goes on the left side (by following the yellow arrow) till the brown cross, even I stop pressing the right key. Basically, the player stays on collision with the wall, but instead of going backward, he goes on the left side (because I had pressed the right key, but the collision was caused by the forward key. I know it’s a little bit confusing, even for me).

To summarize my colliding responses work very well only if I press one key. If I try to press two keys at the same time, it does not know how to respond, and responds by the colliding caused by the second key even the colliding has been caused first by the first key.

This topic is closed to new replies.

Advertisement