Ares FPS & IrrNewt
Ares FPS game and IrrNewt irrlicht\newton wrapper official web-site
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Get force of a collision

 
Post new topic   Reply to topic    Ares FPS & IrrNewt Forum Index -> General discussion
View previous topic :: View next topic  
Author Message
olivehehe_03



Joined: 05 Nov 2008
Posts: 1

PostPosted: Wed Nov 05, 2008 2:08 am    Post subject: Get force of a collision Reply with quote

Not sure how active these forums are, but I'll ask anyway. I'm making a physics based game (google Armadillo Run for a basic idea) and I'm trying to make it so if 2 bodies collide with enough force one object and any attached joints will break.

Checking through the documentation has found newton::IMaterialPair in ContactBegin and ContactEnd, which are part of newton::IMaterialCollisionCallback, which gives me a getContactForce() fucntion but according to the docs:

Code:
The contact force value is only valid when calculating resting contacts. This means if two bodies collide with non zero relative velocity, the reaction force will be an impulse, which is not a reaction force, this will return zero vector. this function will only return meaningful values when the colliding bodies are at rest.

This has me a bit concerned because I know in most cases neither object will be completely at rest. Is there a better way to get the amount of force on a particular object at the time of collision? I can get both objects fine, they're just the other 2 values that ContactBegin gives me and I've got a fair idea on how to destroy whichever object I like but I just need to see if the force of collision is high enough for either to break. Thanks in advance
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Ares FPS & IrrNewt Forum Index -> General discussion All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


© 2007-2008 Informe.com. Get Free Forum Hosting
Powered by phpBB © 2001, 2005 phpBB Group ::