Papervision 3D 2.0 Breaking Changes on Object yaw, roll, pitch

UPDATE: See comments and papervision list for revert of this change.  You can now use localRotationX, localrotationY and localRotation Z instead.  yaw(), pitch() and roll() are back by popular demand.

Hi List,

Sorry for this confusion, but we decided to revert back to pitch(
angle ), yaw( angle ) and roll( angle ) methods.

There are three new getter / setters now though:



pitch( 30 ) would be the same as doing localRotationX = 30;

Note that  localRotationX / Y /Z are rotations relative to the
rotation as set by rotationX / Y / Z.
Also note that after do3d.lookAt() localRotationX/Y/Z will be resetted to 0



Papervision 3D 2.0 Alpha has been undergoing lots of changes and one you might want to know about is the object yaw, pitch and roll change.  Thisis changing on how you access them but only slightly.  This is good because you an read and write the values on the object not just set them. Per the papervision list from the man Tim Knip:

On many users request:

DisplayObject3D‘s methods pitch(), yaw() and roll() are now getters / setters.


do3d.yaw = degrees;
do3d.pitch = degrees;
do3d.roll = degrees;

var myYaw : Number = do3d.yaw;

This means these values are now ‘absolute’ values instead of previous
‘relative’ values as in deprecated do3d.yaw( 1 );

Let me know any issues (as I’m sure there are…)


This only affects the latest and greatest revisions of papervision but is definitely a good change.  It is good to make changes that make more sense without worrying about breaking changes.


8 Responses to “Papervision 3D 2.0 Breaking Changes on Object yaw, roll, pitch”

  1. keith Says:

    This sounds nice, but also leaves me a bit troubled. It seems like now if making relative transformations will be difficult – involving math. Can you explain a simple solution? Better yet, it would be great to have a way to make both absolute and relative. Maybe I am overanalyzing the problem – rotation is always confusing to me since it ‘loops’. e.g. How to control clockwise vs counter-clockwise rotation.

  2. drawk Says:

    Hey keith,

    Well you can now also get not just set. Before it was just a set method like yaw(amount). So really it is the same functionality just now you can get the values more easily.

    Also for control clockwise vs counterclockwise you just do positive and negative values local to the object that you are manipulating.

    Also, with the absolute vs relative situation this seems a bit easier as absolute as you know better where the values are at. It shouldn’t affect anyone too bad but just a more precise way to do things.

  3. Alto Says:

    Let’s say there is a for loop:
    for (var i:int = 0; i < 90; i++)
    some3DObject.yaw = 1;
    If the values are absolute…. does this mean that the object will not turn 90 degrees, but instead stays at 1? How is this different from rotationX Y and Z?

  4. Tim Knip Says:

    Hi all,

    Due to much confusion we decided to revert back to yaw(), pitch() and roll() methods again.

    Added are now new getter/setters: #localRotationX, #localRotationY and #localRotationZ

    One has to understand this: #rotationX, #rotationY and #rotationZ are defining the *global* rotation of an object (they are Euler-angles). The (initial) orientation of the object in space.

    pitch(), yaw(), roll(), #localRotationX/Y/Z however rotate the object *relative* to the rotation as set thru #rotationX, #rotationY and #rotationZ.

  5. drawk Says:

    Hey Tim,

    Wow that much backlash? I thought it was a decent change. Ah well give the people what they want I guess.

    The new getters and setters are great for localRotation. I guess that makes people the most happy and supports all the current code out there. And yaw, pitch and roll are easy and are really helpers that mod those properties but don’t’ be afraid to do a breaking change to prevent bloat or legacy build up.

  6. Матрешкин Says:

    Мне понравилось.

  7. keith Says:

    Thanks for taking my thoughts into consideration Tim! I think it will be great to have both for now.

  8. Тиран Says:

    незнаю, мне всё нравится! 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: