Locking linear and angular degrees

BigHatLogan
Posts: 7
Joined: Mon Sep 02, 2013 4:15 am

Locking linear and angular degrees

Post by BigHatLogan »

Hello

In this thread: http://www.bulletphysics.org/Bullet/php ... 956#p13134

Erwin said:
In addition, Bullet 2.75 will let you lock/unlock the linear and angular degrees of freedom individually for each component (X,Y,Z).
I checked the change logs since that release and have researched a ton an cannot find if this is implemented or how it is used.

I would really prefer being able to lock it an never touch it again this as apposed to calling setAngularFactor(x, 0.0f, z) every frame for every object that needs it

So is there a function for this I am missing?

Thanks
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Locking linear and angular degrees

Post by Erwin Coumans »

You can use object->setLinearFactor and/or setAngularFactor, and you don't need to do that every frame.
Mako_energy02
Posts: 171
Joined: Sun Jan 17, 2010 4:47 am

Re: Locking linear and angular degrees

Post by Mako_energy02 »

Although you should note as it has been mentioned in this post, linear factor (and maybe angular factor, haven't tested) won't work if you use the multi-threaded constraint solver.