#### Archived

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

# Collision response idea (Or not)

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

## Recommended Posts

Okay, I''m trying to work on a collision response system. Here''s what I have so far: I''m using OBBTrees for collision detection. Currently, I''m working with rigid bodies only. My OBBTree/OBBTree collision detection gives me all points (and lines) of contact. This does not include triangles that are completely within the objects (in other words, it only returns points that are on the surfaces of BOTH objects). My objects are assumed to have a constant density throughout (i.e. each point has the same mass, mass(point) = mass(object)/numPoints). I''m working from the reference frame of one of the objects (even if they''re both moving I''m making the motion of B relative to a "stationary" A). My idea is as follows: Find the centroid of all of these collision points (each line is counted as two points for simplicity). This is equivalent to the center of mass (I think) of those points. The first thing is to push the object back (by pushing on the centroid point) until it is outside of the object (how do I calculate that, is there a good way?), then determine (using physics mojo) how much actual force to apply to the object. I could then calculate how much of the objects movement had to be "rolled back" and determind the time that the object travelled up to the collision and take the remaining time for the frame and apply that force (so that it doesn''t stop for a fraction of a frame). A few problems: Multiple moving objects: Imagine a pool table. One ball hits another, which, in the same frame, hits a 3rd ball as a result. Do I have to do this iteratively to be correct? Reverse: How to determine how far back to push on the object at the centroid of the collision points? Also, could this create collisions again on the "other side" of the object''s center of mass (since pushing off-center would rotate the object)? Hmmm...okay, after typing all of this I have quite a few problems with this idea. Is it worth pursuing or is there a much better way to do it that I could add after my basic OBBTree collisions?

1. 1
Rutin
30
2. 2
3. 3
4. 4
5. 5

• 13
• 14
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632961
• Total Posts
3009496
• ### Who's Online (See full list)

There are no registered users currently online

×