Player Camera Ignore Base Rotation

As the title suggests, what I’m trying to do is have the player character obey base rotation, but not the camera and the characterMovement.

My reason for this, is having the camera follow the player on rotating platforms is disorientating and make it difficult for the player to time jumps because the camera is constantly rotating. However, having the player ignore base rotation altogether looks ugly, the player just floats on rotating platforms, and that just looks broken.

In an ideal world, the player and camera would ignore base rotation, but the player MODEL would not, so it would appear to rotate along with the base.

Just as a note, THIS does not work:

268227-ddasd.png

The reason being that the player can no longer rotate the camera themselves using ‘add controller yaw input’.

Any advice?

hello :slight_smile: I know this won’t keep your PlayerCharacter movement from rotating… but have you tried turning off Inherit Yaw Rotation on the spring arm component (if you are using one)?

yep

268229-wewe.png

That doesn’t change anything sadly…

yowza that seems like a pretty expensive solution don’t you think? i had considered doing something like that but updating all that stuff on tick is a pretty big hit… surely there must be a way to do this all within the character blueprint without using tick

Logically, I agree 100% with @Chyros … However, due to the unique needs of my project… I’ve been working with spring arm and camera components exclusively, fulltime over the last six months.

Putting performance issues about moving a standalone camera on tick aside completely… I honestly think that using a standalone camera rig moving separately from the player pawn just doesn’t look as smooth. It might be just me, so please try it and let me know how it looks for you, but this was what my eyes seemed to see.

I would also add that moving a camera actor or camera rig actor (with root, spring arm and camera) wouldn’t be awfully demanding, even on tick. You could even parent it temporarily it to the player pawn, and detach it as needed (rotating and positioning it manually)… it’s the difference in smoothness that is worth double checking.

yes, I do realize the implications of what I’m saying that… a dynamic camera that isn’t part a player pawn / spring arm setup doesn’t appear to move as smoothly to my eyes. Sorry to say this, but it’s just my opinion and I’d be happy to be proven wrong.

This is using the same CameraComponent inside your Character.

  1. On your CameraBoom uncheck all except Use Pawn Control Rotation
  2. On your MouseInput use AddRelativeRotation instead of AddControllerYawInput and AddControllerPitchInput.
  3. On your MovementInput, use FollowCamera’s ForwardVector and RightVector instead of your ControlRotation.

Should work fine. You only have to re-implement keyboard gamepad camera rotation but you can follow what you did on MouseInput.

Your opinion is fine. onTick on camera sound expensive but you’ll only have one for a player. I’ve been using this on my ThirdPerson project on C++ without issues. The advantage is a very dynamic camera you can control easily and is not constrained by player movement due to being attatched. But if you want every bit of performance, by all means, use the default one.

EDIT: I don’t see the difference in smoothness of using CameraComponent against a separate Camera actor.

I’ve added a separate answer for your needs.

You’re welcome. I’ll be retiring my other answer as it wasn’t helpful in your case.

This is behaving weirdly for me… the camera won’t actually rotate in game, and the player just walks in circles

it may be because we are adding rotation differently, but i can’t find the nodes you’re using there. i have the movement input set up exactly like yours but the player just moves in circles

okay i got the camera to behave, it was set to absolute rotation. but the player still walks in circles instead of forward properly

AHA okay got it, i was just using the wrong camera… This works perfectly, thank you so much!!!