# Bullet Physics - scaling

I have added Bullet to my game engine. So far I am using translation and rotation, and it works fine. But now, I want to scale my geometry (eg. user can drink some potion an became small :-)).

I am using

btWorldTransform.setOrigin(origin);
btWorldTransform.setRotation(rotation);


to set position of bullet body directly (it is done only once in initial object placement in scene or in case of teleportation etc. otherwise position is updated by bullet and forces)

Now, if I put object into scene, I set its btCollisionShape and that has some fixed size. Now, I change size of my scene object, graphics has scale, but what to do with bullet collision shape?

I have found setLocalScaling method, but I am not sure if it is, what I want. Can someone verify this?

• If you aleady inegrated bullet to your engine, why not try it? :) Anyway, I would assume local scaling sets the scaling of the collider in its local space - meaning that it gets scaled according to the origin of the mesh. – János Turánszki Jan 5 '15 at 18:01
• @JánosTuránszki Well.. try it means to rewrite parts of the engine :) I was not expection to use scale at first (models were scaled to its real sizes from Blender), but now I have to because of shrinking – Martin Perry Jan 5 '15 at 18:17
• possible duplicate of Bullet Physic: Transform body after adding – Steven Jan 5 '15 at 18:23
• Could be a duplicate of gamedev.stackexchange.com/questions/45203/… - why not try using btRigidBody::setWorldTransform(...) ? – Steven Jan 5 '15 at 18:25
• setWorldTransform doesn´t have a scale part – Martin Perry Jan 5 '15 at 18:58