Hello guys, I’m looking for material shader that rotate object to face camera but I’m having problem with it, i found “RotateAboutAxis” which works fine but only works on one axis like Yaw and since i want to apply this material on my flying actors i need Pitch axis too so it can look down and up but somehow i just cant make it work. my problem is the same as this guy described https://answers.unrealengine.com/que…elatively.html
and many others but no one found a good workaround for it. so any math/shader guy from epic can give us the simplest solution for this please?
@RyanB Hi, saw your comment on similar issue and i wonder if i could ask your help here
It looks like you need a so called “billboard material”'.
Plane noted as “1” - was made in 3ds max and they aligned to X axis
Plane noded as “2” - default UE4 plane which are aligned to Z axis by default. But you anyway can just rotate default plane and whey also fill always look at you’re camera.
That material will act like “billboard” which means what plane will never have any perspective deformation, no matter how you rotate your camera. Imagine if we just photoshoped some square picture on top of frame.
If you need some perspective deformation like that plane rotate around their center (like in would look in real world) you can check that tutorial:
Thanks for the help, I already tried that node “AligneMeshToCamera” before but unfortunately when you rotate your camera the object rotate a little bit too which give unrealistic behavior unlike the first node, I tried to dig into the code and see why it use camera rotation even though it should only use camera distance and object distance but i couldn’t figure it out.
As for the first node “RotateAboutAxis” it doesn’t use camera rotation and it only rotate based on vector between object and camera so I’m stuck on using the first node “RotateAboutAxis” or find a way to fix “AligneMeshToCamera” so it doesn’t use camera rotation.
I’ve created one LookAt shader. Just plug all this stuff to the WorldPositionOffset.
Would it be possible to add functionality to lock one of the billboard’s axes to select object’s axis ? one of the use cases is lightsaber’s fake glow - while being locked to the lightsaber’s axis (along the blade), it would still face camera. This what it looks like glow/bloom no matter how lightsaber is turned.
There is a node called Spline Thicken that is designed to take a thin strip of geometry, and keep it facing the camera along its axis.