You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to create a basic mouse joint so that I can drag objects, similar to this p2 example.
I've had a bit of success with useRevoluteConstraint, but it seems that enable() and disable() aren't actually available in the ConstraintApi returned from the revolute constraint (only seeing motor functions), so I'm unable to disable the constraint while not dragging the mouse. Also, it only really works if I set a different collisionGroup on the mouse body, but then this messes up the collisions on the target body while dragging it. Sleeping/waking the mouse body doesn't seem to help.
Any advice for creating a basic mouse constraint in use-p2 would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to create a basic mouse joint so that I can drag objects, similar to this p2 example.
I've had a bit of success with
useRevoluteConstraint
, but it seems thatenable()
anddisable()
aren't actually available in theConstraintApi
returned from the revolute constraint (only seeing motor functions), so I'm unable to disable the constraint while not dragging the mouse. Also, it only really works if I set a differentcollisionGroup
on the mouse body, but then this messes up the collisions on the target body while dragging it. Sleeping/waking the mouse body doesn't seem to help.Any advice for creating a basic mouse constraint in use-p2 would be greatly appreciated!
The text was updated successfully, but these errors were encountered: