Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

initial_y

collision detection about self-rotating object?

This topic is 5646 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
> 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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!