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"

Measuring Angle Relative To Rotation?

Good afternoon. I’ve exhausted all stubbornness and would be grateful if anyone could help me solve an issue which I’m having. I will try to make this as quick and clear as possible.

Below is the Blueprint which I'm using to measure the pitch and yaw angle between the player pawn and the player pawn’s velocity.

alt text

Using this blueprint, I’m able to pitch and yaw the aircraft and get an accurate measurement as seen in the example below:

Key:

  • Symbol = Player's forward vector.

-0- Symbol = Player's velocity vector..

Red line = Angle to be measured.

Here, the pitch angle is measured at -7°, which is correct. The value is highlighted n the debug string.

alt text

Here, the yaw angle is measured at 8°, which is correct. Once again, the value is highlighted in the debug string.

alt text

Unfortunately, my Blueprint falls apart when the roll rotation of the player pawn changes. Here, what should be measured as pitch is still being measured as yaw and vice versa.

alt text

What I would like to know how do I go about making the pitch angle always relative to the up vector and the yaw angle relative to the right vector.

Any help would be much appreciated.

Many thanks, L.J.

Product Version: UE 4.11
Tags:
1.jpg (100.5 kB)
2.jpg (144.5 kB)
c.jpg (144.4 kB)
d.jpg (137.7 kB)
more ▼

asked May 23 '16 at 04:29 PM in Blueprint Scripting

avatar image

LJR87
11 2 4 7

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

1 answer: sort voted first

Here is the answer which I was looking for: alt text

123.jpg (86.9 kB)
more ▼

answered May 23 '16 at 06:34 PM

avatar image

LJR87
11 2 4 7

avatar image RimmyD May 23 '16 at 08:05 PM

Should mark your answer as the answer :)

(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