Box2D Forums

It is currently Sun May 19, 2013 8:47 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Jul 12, 2012 7:26 am 
Offline

Joined: Fri May 02, 2008 6:23 am
Posts: 28
Hi!

When using the MouseJoint, I must measure the pressure from body A (being dragged by the joint) to body B.

Is this possible?

Thanks.

Jose


Top
 Profile  
 
PostPosted: Thu Jul 12, 2012 7:50 am 
Offline

Joined: Tue Jun 24, 2008 8:25 pm
Posts: 1515
Location: Tokyo
I have never tried them myself, but the mouse joint has these functions which look like they would be useful:
Code:
b2Vec2 GetReactionForce(float32 inv_dt) const;
float32 GetReactionTorque(float32 inv_dt) const;

I think the inv_dt value should be the inverse of your time step length, eg. if you are running the simulation at 60fps, inv_dt would be 60.


Top
 Profile  
 
PostPosted: Wed Aug 08, 2012 12:26 pm 
Offline

Joined: Fri May 02, 2008 6:23 am
Posts: 28
I will check that, 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], Google [Bot] and 5 guests


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