[Resolved]Extending Camera Controls of Default Pawn

Hi,

I’ve been perfectly happy with the default camera controls that comes with the Pawn class.
My application is basically toggling some visual features of a static vehicle. For example when a user presses Enter key, the vehicle changes color.

WHen I capture this keyboard press event in my PawnClass with BindAction, I need to use

AutoPossessPlayer = EAutoReceiveInput::Player0;

Now this takes away the default Camera controls that comes with the default Pawn (or at least thats what I think)

WHat would be the easiest way for me to extend the default camera controls with some additional keyboard events that won’t interfere with default keys like W-A-S-D-Space.
I know that I can attach Camera and SpringArm and replicate the flying camera but I dont want to do that since default Pawn Camera works perfectly for me.

Cheers!

Hi! Camera view point for Pawn is defined with GetActorEyesViewPoint() method. It calls two other methods: GetPawnViewLocation() and GetViewRotation(). The first use BaseEyeHeight to calculate eyes location. The second use just Controller ControlRotation or if there is no Controller get ActorRotation. I think, you can either override the vary first method or just other two.

Aha! Thank you very much for pointing this out.
It seems that GetActorEyesViewPoint() is called each step, so by overriding those View Location and ROtation vectors I can manipulate the view without explicitly attaching a camera.
Awesome and thanks again.

@Kehel18 could you put your comment as answer so I can mark it resolved?

Hi! Camera view point for Pawn is defined with GetActorEyesViewPoint() method. It calls two other methods: GetPawnViewLocation() and GetViewRotation(). The first use BaseEyeHeight to calculate eyes location. The second use just Controller ControlRotation or if there is no Controller get ActorRotation. I think, you can either override the vary first method or just other two.