Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Scalling Bullet physics
PostPosted: Sat Feb 25, 2017 10:09 am 
Offline

Joined: Sat Feb 25, 2017 9:29 am
Posts: 2
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?


Top
 Profile  
 
PostPosted: Sat Apr 15, 2017 2:51 pm 
Offline

Joined: Thu Apr 02, 2015 5:15 pm
Posts: 13
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).


Top
 Profile  
 
PostPosted: Tue Apr 18, 2017 2:59 am 
Offline

Joined: Wed Mar 16, 2016 10:11 am
Posts: 55
It is a known limitation of Bullet. setLocalScaling is not a cure.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group