Collision Detection in Lugaru

The place to discuss all things Lugaru.
Post Reply
User avatar
Man With No Name
Posts: 11
Joined: Tue Nov 06, 2007 5:56 pm
Location: America

Collision Detection in Lugaru

Post by Man With No Name » Sat May 03, 2008 5:12 pm

I was intrigued by the paper David wrote on Character Animation, as well as the paper he referenced. Thus, I launched Xcode and after a while, had some particles with constraints falling under gravity using Verlet integration.:D However, to make anymore progress with the formula's for collision response presented in the paper David referenced, I need collision detection. So, I was wondering what was used for collision detection in Lugaru? Was it a custom collision detection method? If so, would David enlighten me as to what algorithm it's based on? I've researched some different methods of collision detection, but have yet to find one that shows me how to actually get the collision points. Thanks for any info!

David
Project Leader
Posts: 1995
Joined: Wed Nov 19, 2003 10:45 pm
Contact:

Post by David » Sat May 03, 2008 5:52 pm

What are you colliding with exactly? In Lugaru most of the collision is with the terrain or with large stone blocks. To find those collisions you can use line-triangle collision. I think in Lugaru 1 for each particle I checked the line segment from its previous position to its current position against all of the triangles in the nearby terrain or objects. Here is an article(with source code) about line-triangle collision detection.

User avatar
Man With No Name
Posts: 11
Joined: Tue Nov 06, 2007 5:56 pm
Location: America

Post by Man With No Name » Sat May 03, 2008 7:33 pm

Thanks for the quick reply, David! I was mainly thinking about collision with terrain and other objects, looks like the line-triangle collision will do the trick for both.

User avatar
Chainsaw man
Posts: 1492
Joined: Mon Mar 17, 2008 6:13 am
Location: New Zealand

Post by Chainsaw man » Sat May 03, 2008 8:57 pm

And there you have it, the Wolfire forums most Intelegent thread ever!

User avatar
Grayswandir
Short end of the stick
Posts: 3655
Joined: Sat Oct 08, 2005 12:37 am
Location: Robbing the cradle.

Post by Grayswandir » Sat May 03, 2008 11:46 pm

Chainsaw man wrote:And there you have it, the Wolfire forums most Intelegent thread ever!
You ruined it!!!

User avatar
BunnyWithStick
Gramps, Jr.
Posts: 4297
Joined: Mon Dec 05, 2005 12:14 am
Location: New Zealand

Post by BunnyWithStick » Sun May 04, 2008 6:13 am

Chainsaw man wrote:And there you have it, the Wolfire forums most Intelegent thread ever!
Oh, the irony…

User avatar
invertin
Sticky
Posts: 3828
Joined: Mon Oct 23, 2006 4:05 am
Location: IN A CAN OF AWESOME!

Post by invertin » Mon May 05, 2008 1:45 pm

Chainsaw man wrote:Intelegent
....

Are you TRYING to mispell? >:( [/grammarnazi]

User avatar
Renegade_Turner
Gramps
Posts: 6942
Joined: Tue Sep 27, 2005 11:59 am

Post by Renegade_Turner » Mon May 05, 2008 8:10 pm

BunnyWithStick wrote:
Chainsaw man wrote:And there you have it, the Wolfire forums most Intelegent thread ever!
Oh, the irony…
LOL you stole my line.
I'll just say...
Oh, the humanity...

User avatar
Ameefmu
Posts: 57
Joined: Sun Sep 23, 2007 9:59 pm
Location: Melbourne, Australia
Contact:

Post by Ameefmu » Thu May 08, 2008 6:50 am

Oh, the Lugarity!

User avatar
Makrond
Posts: 498
Joined: Mon Jun 25, 2007 11:34 pm

Post by Makrond » Fri May 09, 2008 12:41 am

Oh, my head.

Can we get back to line-triangle collision?

Post Reply