x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Player Camera Ignore Base Rotation

alt text

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:

alt text

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

Any advice?

Product Version: UE 4.21
Tags:
untitled-1.png (130.0 kB)
ddasd.png (1.4 kB)
more ▼

asked Feb 11 '19 at 12:44 AM in Blueprint Scripting

avatar image

hello.aberdeen
25 3 7

avatar image aNorthStar Feb 11 '19 at 01:47 AM

hello :) 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)?

avatar image hello.aberdeen Feb 11 '19 at 01:49 AM

yep

alt text

That doesn't change anything sadly...

wewe.png (4.9 kB)
(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

This is using the same CameraComponent inside your Character.

alt text

  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.

more ▼

answered Feb 11 '19 at 02:19 AM

avatar image

Chyros
1.2k 8 4 7

avatar image hello.aberdeen Feb 11 '19 at 02:31 AM

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

alt text

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

ssad.png (82.3 kB)
avatar image hello.aberdeen Feb 11 '19 at 02:37 AM

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

avatar image hello.aberdeen Feb 11 '19 at 02:39 AM

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

avatar image Chyros Feb 11 '19 at 02:43 AM

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

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question