I’ve already asked how to move an actor in his local axis, now I would like to know how to rotate a mesh component, or an actore, in his local rotation axis.
For example, I have an asset, that I want to place multiple times in my level, in different location/rotation, every time I press a button on my controller it rotate each of them by 45 degrees in their local axis (lets say the local Yaw axi).
Using blueprint I can’t find a way to do that, it’s always in world space or parent space, I know I need to get a variable of the actor rotation at construction time, but how would you multiply only one local axi to make it rotate ?
As usual I’ m sure it’s simple, but I can’t find the solution …
Create a Variable in the Construction Script that Sets the Relative Rotation of the root component.
To be able to add to the rotation you will need to Break the Rotation > Add to Yaw > then Make the Rotation again. Set the Variable again after the move so you can keep pressing the button and it will keep adding to the rotation.
Thanks for your reply, I just get it to work then you posted your answer Good thing is your solution is different than mine and can help later on my project !
Here is how I manage to do it.
I forgot to explain that I need to rotate this mesh depending on the axi value I get from the controller triggers.
Before I had only the mesh component in my BP; I added a child node as parent.
Then, before I used to do like you said, in the construction graph, getting the actor rotation as a variable to reuse in the graph. But I end with this.