I’m trying to create a simulated dynamic lighting effect for my sword for mobile/android which is essentially the light glow effect you would get from a lightsaber. I can already achieve this effect using a sphere mask just fine, but I want to taper/manipulate the shape of the mask to look more like that of the weapon’s shape:
For this I tried using an ellipsoid mask, but I’m having troubles figuring out the math to rotate the ellipsoid to match the world rotation of my sword:
I’ve tried rotating both the world position vector of the sword as well as the absolute world position and while the results look promising, combing RotateAboutAxis for X, Y, and Z produces very odd results.
Any help would be appreciated as I’ve seen similar questions on how to rotate a box-mask to do something similar, but I have not seen any answers.
Disclaimer, I’m doing this logic in a material function and not in a mesh that sits on my sword. The sword is not supposed to have the hot intense glow on it, so I can’t just parent a mesh with a translucent masked material on it to the sword.