collision detection about self-rotating object?

Started by
7 comments, last by initial_y 21 years, 4 months ago
Self-rotating object with speed is zero and angular speed is none zero.So my question is how to deal with angular speed in collision detection?
汇编语言不会编
Advertisement
You don''t need to do anything special. First work out when your objects collide as accurately as possible. Then work out the point of impact between the two objects.

The angular velocity gets included by adding it to the linear velocity of one or both (depending how many are rotating) at the point of impact. The velocity of a point on a moving & rotating body is just

v + w ^ r

Where ''v'' is the linear velocity, ''w'' is the angular velocity and ''r'' is the position of the point relative to the object centre of mass (i.e. relative to the point about which it is rotating).

With these you know the velocity at the point of impact. Use this with other collision properties such as the coeficients of restitution and friction to work out the impulse, i.e. the push that they recieve because of the collision. Apply this to the linear and angular velocity of one or both objects to determine their linear and angular velocities after the impact.
John BlackburneProgrammer, The Pitbull Syndicate
hum ... I think the question was about collision detection, not collision response.

Well, actually I have the same problem and I''m still not sure about the best answer.

here are the solutions I can think of :
-just compute your objet ''s position at the end of the frame, and test to see if it overlaps with another object. If it is not precise enought (when the angular velocity is too big), you may try to make the overlap test at several steps during your frame.( but it still wont be enought if your angular velocity is too hight).
-to deal with hight velocity (one turn or more / frame) you can probably compute a "bounding volume" (maybe an aabb) around your object and test it for overlap


Tang

Perhaps it is too expensive to solve this problem by pure mathematical method...
汇编语言不会编
> Perhaps it is too expensive to solve this problem by pure
> mathematical method...

Not at all. The maths is quite involved, so there are a lot of steps to do to detect the collision and calculate the collision response. But modern machines can do such calculations very quickly, and you generally don''t need to do many such calculations so they can be made complex without slowing down the game too much.

John BlackburneProgrammer, The Pitbull Syndicate
have an article which explains how to compute all this stuff when there is a rotation ?
The only one I found described a method using derivated functions, and I really fear that computing the derivate and searching the 0 would be too slow . (or do you think it would work for a realtime application ?)

Tang
have an article which explains how to compute all this stuff when there is a rotation ?
The only one I found described a method using derivated functions, and I really fear that computing the derivate and searching the 0 would be too slow . (or do you think it would work for a realtime application ?)

Tang
Where is it?I want to have a look.perhaps it could help me to solve this problem.I must solve it!!!
汇编语言不会编
the article was
"intersection of objects with linear and angular velocities using oriented bounding boxes" by David Eberly.

But I still think that this isnt the good way to deal with rotations, unless you need very accurate collisions and have a lot of time to compute it. (the algo seems really slower than the simple no-rotations case, and I dont think it would work in any real-time application)


Tang

This topic is closed to new replies.

Advertisement