Download

Trying to create a twistable Valve

Hi, I hope someone can help me.

I am trying to create a twist-able Valve that can be grabbed and twisted with motion control

I have created a BP with a static pillar as the root, a physics constraint with free angular twist option enabled (everything else locked) and a movable static mesh of the Valve.
I have made the Pillar and the Valve the physics constrained actors and inserted my Grab functionality into the BP graph.
When grabbed the pillar and the valve just start moving around erratically. I take it this is because the grab functionality is affecting the whole BP and not just the valve mesh.

Any ideas would be very much appreciated, thanks

Edit: I can get the valve to spin now, it was set on the wrong rotation axis. The problem now is that it wobbles on the physics constraint when grabbed or rubbed against.

To experiment I tried creating just a cube mesh_BP and locking all physics constraints apart from the Z-Axis in it’s details tab. It spins on the Z-Axis but it also can still be “sprung” in the locked directions when the controller pushes against it.

All I want is it to be able to rotate an object on an axis without any movement in any other direction using physics so the motion controller can spin it, is this possible?

I would avoid using physics, try using overlap collision. When the controller overlaps, add rotation to the valve. Add a button check to simulate the ‘grabbing’ and you can do some simple math to turn it the amount the controller turns.

That sounds like a great workaround, gonna test it out tomorrow.

Thank you!