Box2D Forums

It is currently Tue May 21, 2013 6:08 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Magnitude of collision
PostPosted: Sun Mar 16, 2008 3:56 pm 
Offline

Joined: Sat Feb 23, 2008 5:09 pm
Posts: 2
Hi. First off: nice library. :)

But to the subject: when a collision occurs, one can get the direction of the manifolds of a contact as normal vectors. I'm sure this should be a stupid question, but I can't see anywhere public which allows access to the magnitude of the collision. How could this be done?

Example use case: when a vehicle hits solid geometry, apply damage proportional to the inertia. (For a two-dynamic-objects case, think spaceship and asteroid.)

Thanks!


Top
 Profile  
 
PostPosted: Sun Mar 16, 2008 5:14 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
In Box2D 2.0, the collision listener returns the contact force.


Top
 Profile  
 
PostPosted: Mon Mar 17, 2008 4:42 pm 
Offline

Joined: Sat Feb 23, 2008 5:09 pm
Posts: 2
Ah, right. Time to update, then. Thanks. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Exabot [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group