• Advertisement
Sign in to follow this  

how do I check if the 3D player touching/clashing antoher object ?

This topic is 1230 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

Advertisement

No. You want to do the least possible amount of work to determine whether two objects collide so in general checking each and every vertex every frame would be a bad idea. The typical approach is to surround each object with a *much* simpler shape that defines the collision bounds for the object. Popular choices are spheres and axis-aligned bounding boxes. There are *very* efficient algorithms for determining whether these shapes intersect with each other.

 

This is a big topic but you should be able to find plenty of information and tutorials on the Internet. Try some Google searches for "collision detection", "axis-aligned bounding box", and "oriented bounding box".

Share this post


Link to post
Share on other sites

Have a look into bounding volume hierarchies to further speed up the detection process. Common tree structures are BVHs, octrees and kd-trees.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement