Rotating a staticMeshComponent/actor in his local axis using Blueprint.
Hi everyone !
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 ...
Many thanks !
asked Aug 21 '14 at 08:45 PM in Blueprint Scripting
Take a look at this example below.
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.
answered Aug 21 '14 at 10:05 PM
TJ V ♦♦ STAFF
Found the way to do it :)
If someone is interest to know how let me know I'll explain :)
answered Aug 21 '14 at 09:58 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here