ywywdh / papervision3d

Automatically exported from code.google.com/p/papervision3d
0 stars 0 forks source link

lookAt() results in localRotationX/Y/Z = 0 #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a Camera3D (do not add to the scene)
2. orbit around a target: camera.orbit(camPitch, camYaw, true, camTarget);
3. trace camera.rotationY and camera.localRotationY while orbiting

What is the expected output? What do you see instead?
Since the refactoring to the left-handed system, it is expected that
rotationY doesn't produce the correct value, but localRotationY should!

What version of the product are you using? On what operating system?
rev 706, Vista Ultimate 32bit

Please provide any additional information below.
I've traced the problem back to the lookAt() method. Here the
localRotationX/Y/Z are reset to 0 if (_zAxis.modulo > 0.1): this always
results to "true".

Original issue reported on code.google.com by mailingl...@gmail.com on 28 Aug 2008 at 3:10

GoogleCodeExporter commented 9 years ago
localRotationX/Y/Z are *incremental* rotations.
The lookAt() method influences the *absolute* rotation of an object.
Hence: after a lookAt() localRotationX/Y/Z *must* be reset to 0.

Original comment by tim.k...@gmail.com on 28 Aug 2008 at 11:45

GoogleCodeExporter commented 9 years ago
Above bugreport should have been about obtaining the correct rotation of a 
camera.

When orbiting a camera and tracing its rotation & localRotation I cannot get the
correct rotation. The rotation is capped between -90 and 90 on both sides of 
the 360
degrees.

Could you elaborate on how one gets the correct rotation of a camera/do3d?

Original comment by wttewaall on 1 Oct 2008 at 12:53