Collision detection

Member
Posts: 28
Joined: 2006.12
Post: #1
I can do collision detection using ray-triangle intersection. How do I check for collision between rotating and/or skeletaly animated shapes? Do I need to do matrix transformations using the CPU? If so, is there a fast way of doing matrix and vector operations? Smile

Edit: I'm making 3d not 2d games

-Ummon
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #2
That's something you should do anyway: if you do them with the GPU using for the separate parts (like with glBegin and glEnd), the polygons will be "broken" rather than connected. You might want to look into using quaternions, though: they'll be a little bit easier on the processor.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #3
You could sweep the triangles across the path they will move along and perfom ray/3D object intersection with that, its a lot more easy though to do find an instantaneous intersection check and subdivide time until you know the exact* point in time a collision occurs.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Member
Posts: 28
Joined: 2006.12
Post: #4
Is there any page that shows how to use quaternions directly for transformations rather than just to avoid gimbal lock?
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
this is a good read
http://www.geometrictools.com/Documentat...rnions.pdf

bear in mind quaternions are not THE solution for 3D rotation, somthing else may be easier/better etc.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Member
Posts: 28
Joined: 2006.12
Post: #6
Thanks, I'll read that.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Optimize the collision detection alaslipknot 1 2,489 May 12, 2013 08:02 PM
Last Post: SethWillits
  Collision detection tutorial ThemsAllTook 7 22,251 Nov 5, 2011 05:20 PM
Last Post: SethWillits
  Help with Collision Detection..(i'm almost there) carmine 1 4,508 Jun 29, 2011 12:33 PM
Last Post: ThemsAllTook
  Time Delta, collision detection mk12 19 15,216 Sep 8, 2010 06:40 PM
Last Post: AnotherJake
  Collision detection for pinball game johncmurphy 0 4,661 Sep 6, 2009 02:46 PM
Last Post: johncmurphy