![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
What's your method of collision detection? |
Zaphos
Member #1,468
August 2001
|
Quote: So you solve collision by "slowly backstep, stopping as soon as the character is not in collision with anything, OR when it reaches its initial position (whichever comes first)" ? Well, you might want to do a binary search instead of that. Or you could just push the player out in that direction, eg, by giving them an impulse of force. Quote: This usually works but objects which are fast and small (projectiles) cause 2 problems: Those cases could be worked about by, for example, using a polygon based collision detection, and checking for a collision between the polygon-which-encompasses-the-lion's-path and the environment. Or by testing for collision at fixed-length intervals along the path between the found-collision and the starting point (which may be larger than the forward step-size). Or those cases might simply not be important, depending on the game & such. Quote: IMO, the simplest way to find the correct limit in every case is to.. go forward until you reach it! The main issue with this is that it can be slow. There are situations in which other methods would be preferred. Of course, what one should use depends on the game & target system & so on.
|
Trezker
Member #1,739
December 2001
![]() |
First you just check if a collision has occured at all. This should be done as fast as possible. If a collision occurs, do a proper process of getting the results right. |
Audric
Member #907
January 2001
|
Objects which push each other complicate things.. Also, a gravity-affected object resting on the floor has a permanent collision with scenery. If the collision stops, it's a new event: a fall. |
Simon Parzer
Member #3,330
March 2003
![]() |
I use a tile-per-tile collision detection, as my current project is tilebased. Simple enough: Check the movement values for the current object, if the next tile in movement is "walkable", move the object, otherwise don't. |
|
1
2
|