Open Blackth0rn opened 7 years ago
Hmm... this is one of those special cases where we may need to decide on priority:
forward
(missing from three) and up
(not missing)I am thinking if quaternion exists use that, then rotation, then fwd/up perhaps? Any thoughts?
I hadn't thought of that, was just following what three.js had and trying to work out why my camera was sideways :)
Using the rotation or quaternion sounds pretty reasonable however from looking in the three.js source it seems that the 'up' property is only used by the Object3D.lookAt function. In this function (https://github.com/mrdoob/three.js/blob/dev/src/core/Object3D.js#L274) the rotation/quaternion seem to be ignored so I guess the 'up' value could be defaulted to the rotation/quaternion if the 'up' prop isn't set on an Object3D, which would be the opposite priority order to what you have listed though. 'up' is used if set, if not then check for a quaternion or rotation and use that?
Added the 'up' property to the Object3DDescriptor class to allow setting the 'up' vector for cameras (and other objects), see: https://threejs.org/docs/?q=Cam#Reference/Core/Object3D.up for THREE documentation on the property.
Added a brief item to the documentation for the Object3D class to note the new property being added.