Hi everyone,
Is there a way to add rotation in such a manner?
It doesn’t work because of -180 +180 and you can get numbers over 180
Previously to make this I had to use an additional component like an arrow to get rotation from it and use it for RInterp to as a target value. Now I’m working on refactoring my code and found this piece that I’m trying to optimize. Any help will be appreciated.
This
Just always make sure you add or subtract rotation. Don’t try and calculate the new rotation.
OK, try it with rinterp, it’s designed for it.
I tried but the issue connected with the calculation of the target rotation, can’t figure out how to make this right. When I have target rotation like (0,0,190) this rotation never stops.
I think it also might be that you’re just putting fixed rotations in.
It might work better if you
-
Sample the current rotation ( starting point )
-
Make the target rotation by using a ‘combine rotators’ node, putting the starting point as A, and the difference as B.
Then you can just a lerp.
I’m pretty sure this is right, but not at a machine rn…
1 Like
Thanks, will try it
1 Like
Probably, I found what you meant
3 Likes