Using Bullet Physics for Virtual Reality Applications:

Vaibhav
Posts: 1
Joined: Sat Jan 31, 2009 2:48 am

Using Bullet Physics for Virtual Reality Applications:

Post by Vaibhav »

Hi All,

I am creating a virtual reality based game in which I have two objects: one controlled/moved by a Novint Falcon joystick and other stationary. I want to impose the contact force generated because of the collision on the moving object. Which function should I use to retrieve and display the contact force due to collision on screen?

As of now both objects are solid cubes created by using btBoxShape

One of the solid cube is lying on the ground and has a mass zero so that it acts as a vertical rigid wall

The second solid cube, which I want to move using Novint Falcon joystick has some finite mass

Now in the game I want to pick the movable solid cube and press it against the rigid wall and feel the contact force via the Novint Falcon joystick, for doing that I want to know how to retrieve contact force due to collision between two objects? Can someone help me? Are there any tutorials or sample projects which can help me in my project?

I have setup the framework for the problem by changing the BasicDemo available with the bullet physics engine code.

Regards,
Vaibhav Deshpande.
wael
Posts: 1
Joined: Mon Feb 09, 2009 9:01 pm

Re: Using Bullet Physics for Virtual Reality Applications:

Post by wael »

actually i'm sort of facing the same problem ...
i'm trying to find out the magnitude and direction of the contact/reaction force due to collision at every instant of time between two rigid bodies ...

any help is really appreciated,

thanks,
wa'el
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Using Bullet Physics for Virtual Reality Applications:

Post by Erwin Coumans »

You can use the m_appliedImpulse to measure the applied impulse (impulse = force * delta time), available in contact points.

There are various ways to get access to contact points. One way is to iterate over all contact manifolds. See the Bullet/Demos/CollisionInterfaceDemo on how to do this.

Hope this helps,
Erwin