Skip to main content
GameDev.net gamedev.net
🔒 Locked

Rotational collisions?

Started by EvilProgrammer Mar 3, 2004 at 7:50 PM 0 replies 400+ views
Original Post
EvilProgrammer
EvilProgrammer
There must be a simple answer to this question, but I have never seen this topic brought up before. Surely when an object with a long arm rotates, it can collide with another object without either object having any translational movement. And in a simple physics simulation, the proper response for this can be calculated. However, in a game, what if the object was a person, and the arm was the person''s extended arm, holding a weapon or something, and the object it was colliding with was an enemy that came up close to attack. Another problem is a collision can occur as the result of some sort of animation, I imagine, rather than a rotation of the entire object. The object might have a moving arm. Now surely the person should be allowed to turn in order to fire on the enemy, despite the fact that real life physics wouldn''t allow it (or the enemy would get hit in the head with the weapon and die or something). But I can''t imagine what the game would do in order to resolve this situation, and I don''t have any recollection of this problem coming up in any game I''ve played. I think you could merely bound all these special case objects with spheres in order to prevent this from ever occuring, but under certain circumstances it seems this might produce some rather unrealistic effects.
oliii
oliii
enemies and players are usually bound by a box, which prevents the animations inside to collide with other animations, however, in most games, if you look closely, you can see clipping, like arms and legs going through things sometimes.

there are also anti-flock routines, which forces the A.I. dudes to stay at a good distance from each other. Generally, nothing clever is done, because having collision detection on animations would be too costly (except for games like Tekken 4 and so on). There could be some other tricks, to make sure the extending weapon does not go through walls and such, but they are usually minor.

But you can use some inverse kinematic, to constrain the movement of a character limbs to walls, objects to pickup, ladders, obstacles. It''s a little bit complicated, and expensive, but can be done on a few characters. It''s like controlled ragdolls, if you wish.
Everything is better with Metal.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.