Page 1 of 1

Scalling Bullet physics

Posted: Sat Feb 25, 2017 10:09 am
by virginialuther12
I have further Bullet to my game engine. Actually, I am using rotation and translation it works well.conversely now, I want to set of scales my geometry.I am using:
btWorldTransform.setOrigin(origin);
btWorldTransform.setRotation(rotation);
to set arrangement of bullet body straight Now, if I put thing into scene, I set its btCollisionShape and that has some fixed size. Now, I modify size of my sight object, graphics has scale, but what deal with bullet collision shape?
I found the setLocalScaling technique, but I am not sure if it is, what I want. Anyone can verify this?

Re: Scalling Bullet physics

Posted: Sat Apr 15, 2017 2:51 pm
by aviator
virginialuther12 wrote:I have further Bullet to my game engine. Actually, I am using rotation and translation it works well.conversely now, I want to set of scales my geometry.I am using:
btWorldTransform.setOrigin(origin);
btWorldTransform.setRotation(rotation);
to set arrangement of bullet body straight Now, if I put thing into scene, I set its btCollisionShape and that has some fixed size. Now, I modify size of my sight object, graphics has scale, but what deal with bullet collision shape?
I found the setLocalScaling technique, but I am not sure if it is, what I want. Anyone can verify this?
It is not a good idea to scale physics object during run-time at all, create a physical object with a right scale before you add it to physics world. Or you could have pre-loaded/created several physical representations of a graphical objects, and swap them at run-time (another option).

Re: Scalling Bullet physics

Posted: Tue Apr 18, 2017 2:59 am
by hyyou
It is a known limitation of Bullet. setLocalScaling is not a cure.

I agree with aviator : you have to manually swap the body.