Scalling Bullet physics

Post Reply
virginialuther12
Posts: 2
Joined: Sat Feb 25, 2017 9:29 am

Scalling Bullet physics

Post by virginialuther12 » Sat Feb 25, 2017 10:09 am

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?

aviator
Posts: 13
Joined: Thu Apr 02, 2015 5:15 pm

Re: Scalling Bullet physics

Post by aviator » Sat Apr 15, 2017 2:51 pm

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

hyyou
Posts: 83
Joined: Wed Mar 16, 2016 10:11 am

Re: Scalling Bullet physics

Post by hyyou » Tue Apr 18, 2017 2:59 am

It is a known limitation of Bullet. setLocalScaling is not a cure.

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

Post Reply