To solve this issue with UE4.27 we use a “widget component” and in the parameter of the “user interface” we set “space” = “screen” instead of “world” and the widget is automatically facing the camera.
Yeah, but rotating a component with tick is much heavier than rotatnig pixels with material, even in c++. It may be less convinient in some cases, but not in this one really.
Actually, I love this material a lot as I use it for dev purposes, like describing my trigger boxes and stuff, this way it always faces my camera, even if I’m not playing. I strongly recommend it for level readability
Align mesh to camera is also Evil.
double-click into it and learn how it works.
Re-create it in the material with just Rotate About Axis.
Rotation Axis = Object Orientation
Rotation Angle = Math
Rotation Pivot = 0,0,0 - unless you need to move the pivot to the bottom of the text, in which case - 0,0,-height of text.
Position = Absolute world position including material offsets
For angle math.
You should probably open the C++ function to read if the value to be fed is in radians or degrees.
Either way, SOCATHOA the angle from object position, to camera position.
What? Why?
The material will always work local to the Camera and the Object. It’s the perfect candidate to have each client’s text rotate to face the camera.
Conversely, to do it via tick you need to set up a tag manager that is in charge of orientation calculation on a per-client basis. So that only the current client’s camera is taken into account and the rotation is not replicated.
If he is using the material method and getting that result, then maybe the material is being replicated across the network… it shouldnt be, but its the only thing I can think of…