edited for updates: How can I convert a 360 degree rotation to a 0 to 90 degree angle so that my drone appears to tilt sideways by reading its own Z base rotation value
guys please help me:
i have this ai drone that tilts forward when moving towards player and reverses back to normal when stopping - great
What I’m doing now:
I also want him to tilt sideways based on which direction he is turning, so I took the Z axis and plugged it into the Y axis so that as it turns it tilts the drone either positively or negatively, i even setup a FInterp so that it goes back to 0 (although this is my first time using one) and I also clamped the value from -50 to 50 so that it won’t turn upside down…
When the Z axis goes from a negative to a positive value it doesn’t interpolate slowly between either value it just jumps… for example it could be going slowly following my (player character’s movement) from 40 degress down to 0 but if it is at 40 and then i make the drone turn so that it goes to a negative 40 degrees it just jumps ( it doesn’t interpolate smoothly)…
I’m going to explain it once more in another way:The z is at 40 degrees , interp to 0 is smooth, but interp from 40 to -40 just “switches” between the positive and negative value (instead of going smoothly from 40 to 0 to -40 it goes 40 boom -40 in less than an event tick)
check out my graph and video please, thanks in advance!