# ||| Collision |||

### All replies

• BoundingSpheres and BoundingBoxes. Detection is the easy part. Response is more tricky.
Tuesday, February 27, 2007 5:24 PM
• this is a unique way to solve this problem?
Tuesday, February 27, 2007 6:46 PM
• You might first do a BoundingSphere / Bounsing Box detection, and if collision is detected, you can then iterate through the list of triangles in the model and check for collision with each one of them.

Tuesday, February 27, 2007 6:52 PM
•  Catalin Zima wrote:
 You might first do a BoundingSphere / Bounsing Box detection, and if collision is detected, you can then iterate through the list of triangles in the model and check for collision with each one of them.

1. can I iterate the list of triangles without bounding box / bounding sphere detection? it will be hard for cpu?

2. give me this code pls (triangles iteration and check for collision with each one of them)

Tuesday, February 27, 2007 7:21 PM
• You should always do a bounding box/sphere check before moving on to check individual triangles within an object. The bounding box check is one simple equation that can allow you to skip checking an entire object (potentially thousands of triangles) for a collision.
Tuesday, February 27, 2007 7:41 PM
•  Hlubocky wrote:
 You should always do a bounding box/sphere check before moving on to check individual triangles within an object. The bounding box check is one simple equation that can allow you to skip checking an entire object (potentially thousands of triangles) for a collision.

ok, give me a code please! (for checking triangles only)

Tuesday, February 27, 2007 8:07 PM
•  Andrew3 wrote:

Hlubocky wrote:
 You should always do a bounding box/sphere check before moving on to check individual triangles within an object. The bounding box check is one simple equation that can allow you to skip checking an entire object (potentially thousands of triangles) for a collision.

ok, give me a code please! (for checking triangles only)