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 Controller Pitch isn't relative

In the flying template, I changed the movement and rotation. For pitch, I'm using Add Control Pitch Input. I'm doing the same thing for Roll. However, with Roll, the controller input is always relative to the controlled pawn. With Pitch, it's always relative to the original orientation of the world.

In a flying game, for proper multiplayer replication, pitch needs to be relative to the controlled pawn. I've recreated the issue in a clean project and you can find it at.

https://drive.google.com/open?id=0B4sbB5vCbhAHTFhfOGFucWdDZXM

You can see a video of the issue here (I've fixed the Gimbal Lock Issue) Pitch Issue Video

Product Version: UE 4.13
Tags:
more ▼

asked Oct 03 '16 at 08:02 PM in Blueprint Scripting

avatar image

CharlieTheTall
196 14 26 41

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

1 answer: sort voted first

This is because the player controller doesn't have a phyiscal representation in the world. There is an option on the playercontroller class to "Attach to Pawn" But if you read the description it explicitly tells you that it expects the pawn to implement it's own rotation. See here for a good metaphor that describes the system:

https://answers.unrealengine.com/questions/439482/direction-movement-and-look.html

What you need to do is turn off the use controller rotation options: alt text

And then use these nodes instead of the Add Controller Input nodes:

alt text

newnodes.png (123.8 kB)
more ▼

answered Oct 03 '16 at 08:59 PM

avatar image

MadisonAster
140 6 7 12

avatar image CharlieTheTall Oct 03 '16 at 10:00 PM

Add Actor Local Rotation doesn't replicate very well in an MP game. You'll see other players "stuttering" around the level. The advice thus far has been to use Add Controller Pitch, Roll, Yaw, movement as it's processed automatically on the server and replicated to the clients seamlessly.

Add Local Rotation works well for single player for sure.

(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