How to add control rotation to non-possessed pawn?

Is there some way or alternative to Add Controller Yaw/Pitch Input when you’re not possessing a character? I can use Add Actor Local Rotation but that looks bad, doesn’t have smooth movement or built in settings for character movement or floating pawn movement.

Doesn’t work without possessing the pawn

Looks bad

Hey @Astaraa!

What if you use an AI controller? You could have it possess the pawn when your player isn’t possessing it. It can be a pretty simple bare-bones controller, only having the little things you want in it. That way you can do more smooth rotations with its character movement component!

It has an AI Controller. Maybe there’s something I’m missing? It doesn’t seem to respond to things like Add Controller Yaw Input.

I’ve seen you around and I know you’re competent with the engine so I’m going to be quick and hard with responses, I hope that’s okay!
How does it respond to Use Controller Desired ROT?

That’s fine :slight_smile:
Add Controller Yaw/Pitch Input still doesn’t respond with Controller Desired Rotation.
I have the Character Movement Component deactivated because I’m using Floating Pawn Movement (for drones/ships). But I did try activating it with desired rotation and there was no change.

What about:

  1. Using a LookAt function to get a vector to rotate towards,
  2. setting current Rotation, and
  3. implementing a timeline with just a float variable and a LERP from point A to point B? (you could even pepper in an overshoot by going up to 1.1 and back down to 1.0 :stuck_out_tongue: )
1 Like

That sounds like more for doing a single turn?
I’m trying to rotate constantly with the mouse… mouse look.

Wait so is this for a player pawn with floating pawn movement?

I thought we were talking about something unposessed?

Or is this an AI that will follow your mouse movement?

Yes it’s un-possessed… but in a nutshell I’m trying to mimic possession, because Lyra doesn’t like possession (figuring that out is much more confusing). So the player character is telling the vehicle what to do through an interface. The vehicle remains its own character and has a default AI Controller. The only thing it won’t do is add controller input. So I’ve got this add actor local rotation instead, but it looks jittery. Not sure how well it shows here…

It becomes a lot more obvious at times.

I see exactly what you mean!

It’s because it’s updating between each tick.
And that’s why you were trying to use add controller input rotation because it wouldn’t rely on that.

And you need to call C++ functions to add things to the playercontroller when possessing something on runtime in Lyra.
Hmm…

You aren’t using a controller to control the vehicle… hmmm…

You could try setting your look from Interface Vehicle to function on tick instead of as an event, and only pass through using a bool showing the player is in the vehicle (you’d just disable tick for the vehicle until interacted with, and disable it again when exited/vehicle is “dead”). Can you set the event trigger to be faster? Make it fire once per tick?

1 Like

I really appreciate the help :raised_hands:
Based on that idea I’ve got a setup that’s working well.

On enter vehicle:
enable tick on vehicle
on vehicle tick, get player > get controller > get control rotation,
Rinterp to that rotation

On exit: disable tick.

2 Likes