Stop UI rotating with Character
I'm currently trying to make a more dynamic UI that shows when the character is charging an attack, but when the character rotates the UI does too as it's in the Character blueprint. Is there a way to tell the UI to constantly face the same direction? Thanks in advanced
asked Jun 03 '18 at 05:23 PM in Blueprint Scripting
I'm assuming by UI you mean a Widget Component added to the Character blueprint. Components are parented to their containing Actor so they automatically follow their transformations such as location, rotation, etc.
To solve this problem in my current project, I made the widget a separate Actor, and either attach it by location only, or update its position every Tick (first way is more performant if you can get it to work).
There might be a way to set a component's attachment to its parent actor to be by location only, but I haven't explored enough to find out.
If the rotation is not parented to the Character though, you'll have to keep it facing the camera some other way, which may again involved per-tick updates to set the rotation to the LookAt from the widget to the player's Camera (unless you're making it a Screen Space widget, in which case it will always face the camera).
There are a lot of ways to approach this, and I have only tried one or two.
answered Jun 06 '18 at 09:17 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here