Original Post
🔒 Locked
collision
Advertisement
In a first person shooter, the player generaly has a bounding sphere or an ellipsoid. This depends of the polygons that define the player (if any) and how much processing power you want to do (for example, making collision for a sphere is easier than with an elipse). Generaly, the bounding sphere is the average of the distance of the vertices points of the polygons defining the player to the origin of it's local coordinate center (kind of a weird sentence, but i hope you understand that).
This appens in todays 3D engines. In DOOM, for example, the player didn't had polygons, he was just a point with a radius.
When you move against a wall (not direct), the program tests if any part of your bounding sphere (if not an ellipsoid) is inside the wall. If so, then the program 'repulses' the player in the direction of the wall surface normal. Doing this repeatly, gives the illusion that the player is sliding, when actualy the player is constantly being repeled by the wall.
This is a special case, because if you move directly at a wall (thus making an angle of 90 degrees) the program will not allow your bounding sphere to enter the wall.
This is the way i know that people do things, it doesn't mean that there are no other ways.
Edited by - wolverine on October 14, 2000 10:14:58 AM
This appens in todays 3D engines. In DOOM, for example, the player didn't had polygons, he was just a point with a radius.
When you move against a wall (not direct), the program tests if any part of your bounding sphere (if not an ellipsoid) is inside the wall. If so, then the program 'repulses' the player in the direction of the wall surface normal. Doing this repeatly, gives the illusion that the player is sliding, when actualy the player is constantly being repeled by the wall.
This is a special case, because if you move directly at a wall (thus making an angle of 90 degrees) the program will not allow your bounding sphere to enter the wall.
This is the way i know that people do things, it doesn't mean that there are no other ways.
Edited by - wolverine on October 14, 2000 10:14:58 AM
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement