Download

How to tell if an actor has a negative rotation?

How can I tell if the actor has a negative rotation in blueprints?

bumpy bump bump

Hi, what do you want to do? You’ve got roll, pitch and yaw rotation, do you want to know if all three are negative, or only one, or…?

By the way, under Blueprint Visual Scripting you might get a higher chance of an answer for this kind of question =)

Reason I want to know, is beacause I want to interpolate stored rotation values over time. A -180 degree rotation interpolated with 180 rotation, would look very different to interpolating 180 degree rotation with 180 degree rotation. the latter would be still. nothing would happen. the former would do one whole rotation in the interpolation.

RInterp from -180 to 180 would stay still, and RInterp from -179 to 179 would move 2 degrees.

it may well do, but im not using R-interp. Im using standard interpolation of values, which would produce produce a different result.

You could make a rotator out of the float value then use RInterp then again break the rotator. That way you can interpolate a single angle only.

Imagine animating a clock hand, going from 12pm to 11am. It is important which way the clock hands move when interpolating the two animation frames that make up the animation. This is the functionality which requires knowledge of whether the angle is negative or positive.