How to disable movement/physics in a particular direction?

85844-constraint.gif

In the above gif, I’m using a motion controller with a static mesh ( the mug) as a child of the hand. I’m trying to make it so I can push the box on the right towards the box on the left (it’s along the x-axis). The two boxes are joined by a physics constraint. You’ll notice though that if I approach the box from another angle, the box starts jittering and starts moving around in the Y and Z axes. I don’t want that to happen.

Even though my joint is set to only move on the X-axis, I think the problem is that the mug (that does not have physics enabled) pushes the box to a new position and then the physics engine snaps it back to where it should be with the constraint. Is there a way to somehow tell the physics engine to never update along the Y and Z? Or somehow manually set the Y and Z back to 0 after the physics tick has happened.

Any help is much appreciated. Hopefully my description made sense :slight_smile:

Edit: The same thing happens if you make a cube (with physics disabled) move by changing it’s position every tick and have it collide with a physics enabled cube.

Hey, cool gif.

What if you played with the mass of the box? would it be less likely to jitter?

I suppose you know about the constraints and have already set it in the Physics panel.

Yeah I’ve tried all the constraints there are. I feel like those constraints only apply if it’s only physics objects interacting with it. Because my hand only has collision on it but not physics enabled, it doesn’t matter what the mass of the box is. My hand can move anywhere it wants, and physics objects seem to break down.

I can’t make my hand physics enabled because I’d get into situation where my real hand is in a different position than how I see it in VR.

I’m not sure I’ve never pushed physics in that direction. Maybe it’s not a bug, it’s a feature? :slight_smile: