• Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

# Collision Curiosity!

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

1 reply to this topic

### #1ThePointingMan  Members   -  Reputation: 146

Like
0Likes
Like

Posted 19 March 2013 - 07:37 PM

I'm currently working on a little game in c++. I've made it possible for things to be rendered, moved, all sorts of crazy Jazz, my next goal is to work out some hit detection. I'm using 3d quads and I was wandering, after I transform the quad with a bunch of matrices is there any way to retrieve each vertex's new location to test for collision, and What are some ways people in the industry deal with collision?

If there is no way of retrieving the vertex's new location would anyone know what sort of algorithms they use to make these transformations so that I could make a similar matrix system for dealing with my hit box's position?

Edit: Sorry I really should have looked harder before making this topic, I've found some useful information on retrieving vertices in this other topic http://www.gamedev.net/topic/588704-directx9-c-get-vertices-from-mesh/

However I would still like to ask how people typically deal with collision detection once they have the location of these vertices.

Edited by ThePointingMan, 19 March 2013 - 08:37 PM.

If your want a laugh http://thepointingman.tumblr.com/ Most of this is just silly little art things I do.

### #2EddieV223  Members   -  Reputation: 751

Like
2Likes
Like

Posted 19 March 2013 - 08:47 PM

vec3 transformedPosition = myVertex.pos * objectsWorldMatrix;  // may need to convert the vertex pos to a vec4 for multiplication to work.

This is how you get the world space position of a vertex.  ( this is just an example ).

There are many types of collision detection, it usually boils down to a broad phase and narrow phase tests.  Broad is quick and easy but not very accurate, like AABB for example.  If a collision is detected using AABB then you can do something narrower like polygon collision detection.

However there are all sorts of collision detection algo's you will have to do some research for in depth analysis of each one, there are some books on the matter too.

Edited by EddieV223, 19 March 2013 - 08:53 PM.

If this post was helpful and/or constructive please give rep.