I've looked through the forums, and spent numerous hours trying to figure this out. I can get my rigidbody to move using m_pP2PConstraint->setPivotB(btVector(x++, 0, 0)) where x starts at 0, but not using the setPivotB call with the mouse's world coordinate ray. Anybody run into something like this?
Thanks!
setPivotB not seeming to work with mouse
-
- Posts: 41
- Joined: Fri Apr 29, 2016 2:41 pm
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
Re: setPivotB not seeming to work with mouse
I don't think this would work. Try creating a kinematic body and then move this instead of the pivot.
-
- Posts: 41
- Joined: Fri Apr 29, 2016 2:41 pm
Re: setPivotB not seeming to work with mouse
I have the Rigid Body moving using the mouse ray and setPivotB just like the examples do. I am using a btGImpactMeshShape into a btRigidBody. I still cannot get rotation when I move the pivot around though.
-
- Posts: 41
- Joined: Fri Apr 29, 2016 2:41 pm
Re: setPivotB not seeming to work with mouse
And it started moving use setPivotB once I called setActivationState(DISABLE_DEACTIVATION)
-
- Posts: 350
- Joined: Sat Jul 04, 2015 10:33 am
- Location: Bern, Switzerland
Re: setPivotB not seeming to work with mouse
Your problem has to do with object deactivation. Your solution might therefore simply be to leave this object activated all the time, or by activating it when you want to move it. Otherwise, if this object is an entirely user-moved object, you could make a kinematic object (set mass to zero) out of it and move the object directly. Does your object need to be able to react to other objects in a physical way?