x


Yaw, Pitch, Roll adjustments relative to object?

I am a newbie stil learning / exploring Unity.

In a 3d flying game I want the player to be able to control yaw, pitch, and roll of their craft.

This means that RELATIVE TO THE PLAYER CRAFT yaw changes the horiziontal direction of craft, Pitch changes the virtcle angle, roll is rolling around the forward axis.

To do yaw pictch roll means that once the orientation of the craft is off of 0,0,0 then a change in yaw or pitch or roll will be relative to the craft but in real world coordinates/orientation a change to yaw will be a change in multiple real world orientation axises.

Does Unity support this directly somehow?

more ▼

asked Aug 12 '10 at 05:39 PM

RSud gravatar image

RSud
196 25 27 36

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I'm not sure if you've gotten your answer already. But seeing that no one has yet to post an answer, here's mine (albeit a simple one).

What you're describing in your third phrase seems to be the Euler angles of an object:

  • yaw would be the euler rotation y around the y axis of the object
  • pitch would be the euler rotation x around the x axis of the object
  • roll would be the euler rotation z around the z axis of the object

Here's a link to the online reference regarding an object's Transform component where you may find direct references to controlling an object's (rather, an object's Transform) rotation and euler angles : Transform component

more ▼

answered Sep 30 '10 at 05:29 AM

zannghast gravatar image

zannghast
526 11 14 26

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

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Topics:

x124
x59
x43
x8

asked: Aug 12 '10 at 05:39 PM

Seen: 2919 times

Last Updated: Aug 12 '10 at 07:21 PM