Disabling influence of a Lerp Rotator

I am attempting to use a lerp (rotator) node to disable an aim at behavior, but when lerping from 1 to zero the object being controlled flips. The object is a card that is facing a camera. I just want the camera’s influence to stop influencing the target at a point (I thought that using the lerp should do it) or at least to lerp to the new rotation (in my case 0, 0 ,0). Obviously I am missing something. Appreciate your thoughts. Thank you. Quick note, I am going from 1 to 0 by reading the Z position of an empty actor which is keyframed in sequencer from 1 to 0. In my case I was only affecting the Z rotation of the card.

Try to use AddActorWorldRotation.
The influence of the lerp will be correct in this case.

image

My Products

1 Like

I think the problem might be the “FindLookAtRotation” node
This node does not define a specific up-axis, so the rotator you get out can seem a little random depending on the values.
I usually use MakeRotFromAxes (or one of the other alternatives) instead
then you can define the other axes.

Thank you Supremative and FishBone0 for the tips. I tried the addactorworldrotation by setting and getting the previous rotation and adding the difference in the angle to the object. It works as expected but the flip still occurs. stepping through each frame, the rotation goes from +179 to -179 after a given point so yes, the issue has to do with wat the FindLookAt calculates. I even tried subtracting 180 from the -17xx and then adding 180 so that my number would keep increasing after the +179, but the rotation becomes 500+ and although it sort of works it seems a lot of patch work. In Maya when constraining any object to any object you have an influence named “Envelope” which goes from 0 to 1. 0 basically disables the influence. This is what I am trying to accomplish. Still at it.

Did you try to use MakeRotFromAxes?

What is the “look at direction”, at both the correct result, and the flipped result?
And what is the resulting direction-vectors from the rotator?