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"

Properly rotate Character+Camera+Controller

Hi everyone,

I'm trying to rotate my Player character in 3D space using Input keys (for Roll and Pitch). Camera Yaw and Pitch is controlled as known by the 3rdPerson Template using the mouse. What I'm trying to achieve is something similar to the movement of an astronaut in zero gravity.

The problem is, I can't get the Control Rotation to work - the yaw/pitch for looking up/down/left/right obviously has to follow the character rotation but it doesn't.

Currently, I'm adding a Local Rotation to the Character and Camera. The Control seems to be unaffected by the camera rotation - the mouse keeps rotating the view around WorldY and WorldZ instead of CharacterY and Z.

It feels like I haven't fully grasped the connection between Camera and Controller yet, maybe I'm doing something significantly wrong here?

Thank you, any help is highly appreciated!

Product Version: UE 4.20
Tags:
more ▼

asked Aug 26 '18 at 11:37 AM in Blueprint Scripting

avatar image

bananenbaer
6 1 2

avatar image Nebula Games Inc Aug 27 '18 at 08:16 PM

I am confused, when you say "movement of an astronaut in zero gravity" do you mean the character themselves? Or the view? The way I see it, you can rotate your "character" in a weightless environment with a stationary camera and only move the camera when the player actually translates their position but remain in place with rotation. Or you want the camera to be on a spring arm and rotate the entire view in line with the character?

avatar image bananenbaer Aug 28 '18 at 04:25 PM

I mean rotating the character, e.g. using buttons Q and E to roll around the X/Forward-vector and buttons R and F to pitch around Y/Right-vector. The Camera should rotate/move along and the mouse input as well. I already found the solution; see my answer below,

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

So I probably had the wrong idea of how to do this. I thought it would be best to use what's already there: "Add Controller Input", but I couldn't figure out how to rotate the reference axis of the controller view along with the character. So I just added a relative rotation to the camera and it's all fine. Thanks for the input!

camera-view.png (163.9 kB)
more ▼

answered Aug 28 '18 at 04:30 PM

avatar image

bananenbaer
6 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Camera has an option for Use Controller Rotation. maybe you need to switch that on or off to make it independent from te body.

more ▼

answered Aug 26 '18 at 01:39 PM

avatar image

mightyenigma
3.8k 18 20 20

avatar image bananenbaer Aug 27 '18 at 03:33 PM

Disabling that means I would need to add rotations to the camera according to the mouse input as well as the character... I will give that a try. Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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