« Return to Thread: [Breaking Change] DO3D has new props localRotationX / Y /Z , pitch, yaw, roll are methods again

Re: [Breaking Change] DO3D has new props localRotationX/ Y /Z , pitch, yaw, roll are methods again

by Paul Tondeur-2 :: Rate this Message:

Reply to Author | View in Thread

Hi Tim,

I'm experiencing some problems after this update which you might not be
aware of.

When I execute onenterframe for example the following code:

object.yaw(1)
trace(object.rotationY);

When I expect to receive a value of +/- 90, it will return NaN. I've
located this problem to changes in the Matrix3D class.
The following code execution is happening and will trace NaN as well:

var number:Number = -1.0000000000000029;
trace(Math.asin(-number/1)); //Traces NaN

Unfurtuantly I'm not that skilled right now to solve this problem. Maybe
you have an idea?

When I do for example a object.pitch(1) and trace(object.rotationX), it
will return the right values.

Beside it seems that rotationY is always between -90 and +90, instead of
between -180 and +180. Is this a bug, or is it a feature, which use I'm
not aware of?  :-)

Paul

-----Original Message-----
From: papervision3d-bounces@...
[mailto:papervision3d-bounces@...] On Behalf Of Tim Knip
Sent: zondag 20 juli 2008 18:32
To: papervision3d@...
Subject: [Papervision3D] [Breaking Change] DO3D has new props
localRotationX/ Y /Z , pitch, yaw, roll are methods again

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:

do3d.localRotationX
do3d.localRotationY
do3d.localRotationZ

So:

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

Tim

_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 « Return to Thread: [Breaking Change] DO3D has new props localRotationX / Y /Z , pitch, yaw, roll are methods again