Sign in to follow this  
CastorX

Bullet Physics object combine

Recommended Posts

CastorX    132

Hi everyone,

 

I'm using bullet engine as my physical engine in my game. After solving many problems gathering a lot of information (even from GD.NET) I have another problem. I want to "weld" two rigid bodies. For example My model is a bed. It consists of the wooden frame and the mattress. But I want to handle it as one DYNAMIC object with different properties like friction of wooden parts and the mattress and different collision object for them. The above example might not be the best, but I want to do something like that.

Thanks in advance!

Share this post


Link to post
Share on other sites
Krohm    5030

I'm afraid you cannot do that "natively".

I guess it's not going to work with compound shapes either.

My best bet is that you'll have to define as many rigid bodies as needed (by different properties). The mattress would probably have to be a soft body... and then join them by using the hinge constraint I guess.

Alternatively, using a polygon soup with a material callback might do the trick, but I hate polysoups with passion so I never looked into them in detail.

 

Constraints are really the only way to make two objects appear somewhat connected. They are in no way "welded". In no way you can ask a rigid body to have different friction for different parts when working with the "standard" shapes (trisoups are not standard shapes).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this