"Set Control Rotation"-Node doesn't work

Hello,

my problem is, when the actor should actually rotate on place, it does nothing. First i thought, the AI controller isn’t applied right to the actor, but the “Simple Move to Actor” works, which needs an applied AI controller. Theoretically this “Rotation”-Node should also work. Why isn’t the actor rotating?

Regards

1 Like

It is no longer intended to be called on AI controllers. See here.

I think this was a result of the api evolving in how it was used over time, and agree that it is now confusing. At the very least, the method should be made private by AAIController, and the BP node unavailable. Really though this is still not ideal, since the method is declared as a public virtual in the base AController class, so it would still be possible to access it through a base pointer.

Anyway, as Mieszko says, you need to use another approach. What is the overall aim you’re trying to achieve here?

Ahh okay, good to know, thanks for the information! Should I use Set World Rotation combined with Rinterp-Node to make the actor rotate smoothly?

This is in a function from the parent Enemy class, when the enemy is near enough to attack, it should rotate to me, including while it’s playing an attack animation (except a variable is set to true to avoid the rotating).

Something along those lines would work, but may be overridden by what the AI controller is doing internally.

I believe the idea is to set the UseControllerDesiredRotation flag to true, configure the RotationRate as you want, and then let the AI code deal with the turning by telling it what your AI should be looking at via SetFocus/SetFocalPoint. I haven’t made use of this as yet so I can’t say for sure how it works.

I already used that with “useControllerDesiredRotation” to let the actor smoothly rotate while he’s walking. For in-place rotating, the idea with rinterp-node works!