Rotate towards using Vertex Offset
Posted: Fri Jul 20, 2018 3:38 pm
Hi,
The new version of ASE bring some awesome nodes, like "Rotate About Axis" and it helped me a lot. I want to make particle or non-particle shader that will rotate the mesh towards the player. Currently, I discovered how to just instantly rotate the whole mesh, even particles towards a player or other transforms. But I need to rotate is slowly, using mask or values, it cannot be done with my current method (https://prnt.sc/k8xflc), found this method here (https://realtimevfx.com/t/unity-5-5-5-6 ... tream/2328).
Is there any way to slowly rotate mesh towards another transform, from one rotation to another? Like in Unity functions "RotateTowards" or "Quaternion.LookRotation + Quaternion.Lerp" or something similar. For now, I can think only of two methods.
First method: Using Lerp, but I need to calculate the current and desired rotations, maybe there are some nodes that will help me with this? Basically, I need to convert Quaternion.LookRotation to the shader code, I think...
Second method: Using "Rotate About Axis" node to rotate mesh towards the player, but for that, again, I need to somehow calculate how much and on which axis I need to rotate it.
The new version of ASE bring some awesome nodes, like "Rotate About Axis" and it helped me a lot. I want to make particle or non-particle shader that will rotate the mesh towards the player. Currently, I discovered how to just instantly rotate the whole mesh, even particles towards a player or other transforms. But I need to rotate is slowly, using mask or values, it cannot be done with my current method (https://prnt.sc/k8xflc), found this method here (https://realtimevfx.com/t/unity-5-5-5-6 ... tream/2328).
Is there any way to slowly rotate mesh towards another transform, from one rotation to another? Like in Unity functions "RotateTowards" or "Quaternion.LookRotation + Quaternion.Lerp" or something similar. For now, I can think only of two methods.
First method: Using Lerp, but I need to calculate the current and desired rotations, maybe there are some nodes that will help me with this? Basically, I need to convert Quaternion.LookRotation to the shader code, I think...
Second method: Using "Rotate About Axis" node to rotate mesh towards the player, but for that, again, I need to somehow calculate how much and on which axis I need to rotate it.