Bullet Physics object combine

Started by
1 comment, last by CastorX 11 years, 2 months ago

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!

Advertisement

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).

Previously "Krohm"

Thanks for the reply. I think I wil try to do that with a hinge and check if it works weel enough.

This topic is closed to new replies.

Advertisement