Lock rotation axis of child static mesh

I have left and right pedals for a bike, parented to a crankset and attached via sockets. As the crank turns, I want the pedals to turn around with it, but to keep the pedal’s Y rotation locked (allowing the pedals to stay horizontal as they’re rotated around with the crank arm).

This seems like a simple setup, but I can’t see a way to lock the rotation of the pedals in Y axis only (have tried setting absolute rotation on the pedals, but that locks all axes).

I understand I can use physics constraints, to connect the pedals to the crankset, and then constrain rotation there, but I want to avoid calculating physics where possible.

I understand I can set the rotation on the pedals every tick, by getting the current Y rotation and applying the inverse. Again, this seems like an overcooked solution.

Is there a really dumb, simple way to just say to Unreal - “lock the pedal’s Y rotation” ?

Thanks very much!

Answer in a nutshell, use a ‘scene’.

Do it like this:

  1. click a pedal

  2. select ‘add component…’ and choose scene

  3. notice that the scene has the same transform as the pedal ( details panel )

  4. drag the scene onto the pedal ( which disconnects the scene from pedal )

  5. drag the pedal onto the scene ( which makes the scene the parent of the pedal )

  6. drag the scene back to the point where the pedal was orignally attached.

It sounds like a lot but it’s not. What you end up with is the pedal connected to something that you can move around with other components, but it wont affect the pedal.

Tell me how you do… :slight_smile:

( PS: I’m assuming this is all happening in a BP )