Rotating a component with a given axis

Hey guys, I’ve tried a lot of things, none have worked perfectly and I could definitely use some help on this one.

Basically, I’m trying rotate a blueprint component (empty child actor, parent to a static mesh and collision) along its local x, y or z axis, the axis of rotation being chosen by the user before startup. It also needs to be oriented from the axis to the position of the VR controller. So far I’ve managed to make it work successfully, but only if the rotation in editor remains untouched (aka drag the BP in and don’t rotate it). I need it to orient itself towards the controller no matter the rotation put on the blueprint in world.

Thanks!

Here’s what I got so far, I feel like I’m somewhat close but I don’t doubt I could be very wrong:

Have you tried attaching the component to a scene in the BP?

You can manipulate the component any way you like. When you’re ready, attach it to a scene and then move the scene, rather than the component.

The scene will have zero translation, very easy to code, and the component moves with it.

Hi, I’m not sure I understand. The values are already zero’d out in the child component (it’s at the 0,0,0 in the blueprint and has no rotation). The problem is I need to find the angle to turn it at depending on the blueprint’s initial rotation. Basically, if I were to trace a circle going through my controller and around the bp, I need to know which angle I’m at in x, y, and z. Pardon me if I didn’t get what you were going for there.

My fault, got the wrong end of the stick…