setPivotB not seeming to work with mouse

Post Reply
erbisme4@yahoo.com
Posts: 41
Joined: Fri Apr 29, 2016 2:41 pm

setPivotB not seeming to work with mouse

Post by erbisme4@yahoo.com »

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!
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Re: setPivotB not seeming to work with mouse

Post by Dirk Gregorius »

I don't think this would work. Try creating a kinematic body and then move this instead of the pivot.
erbisme4@yahoo.com
Posts: 41
Joined: Fri Apr 29, 2016 2:41 pm

Re: setPivotB not seeming to work with mouse

Post by erbisme4@yahoo.com »

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.
erbisme4@yahoo.com
Posts: 41
Joined: Fri Apr 29, 2016 2:41 pm

Re: setPivotB not seeming to work with mouse

Post by erbisme4@yahoo.com »

And it started moving use setPivotB once I called setActivationState(DISABLE_DEACTIVATION)
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: setPivotB not seeming to work with mouse

Post by benelot »

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?
Post Reply