thcmedia / papervision3d

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

DisplayObject3D.lookAt error #84

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Place a DisplayObject3D at 0,0,0
2. Place another DisplayObject3D elsewhere
3. Use the lookAt() method to have the second object look at the first

What is the expected output? What do you see instead?
This should work since the objects are in different places, but instead it
outputs "lookAt error".

What version of the product are you using? On what operating system?
Latest build of GreatWhite branch on Windows Vista

Please provide any additional information below.
I was able to fix the problem by changing the 4th line of the function to
_position.reset( transform.n14, transform.n24, transform.n34 );

This takes uses the correct coordinates for the object so it no longer
thinks it's at 0,0,0.  I'm not sure if this has any side effects, but it
fixes my problem.  An example app is attached. 

Original issue reported on code.google.com by frozenan...@gmail.com on 6 Aug 2008 at 6:37

Attachments:

GoogleCodeExporter commented 8 years ago
This is actually not really a bug, but a feature, so to say. I'll let Tim 
elaborate.

Original comment by r.hauw...@gmail.com on 8 Aug 2008 at 1:25

GoogleCodeExporter commented 8 years ago
Hi, the 'bug' is indeed a feature of PV3D.
The problem is that objects only are fully initialized after an object had been
rendered at least one time.
So, your problem would be fixed if you render your scene once and only *then* 
perform
the lookAt().
We're planning to fix this issue somewhere in the future, but for now its 
simply too
complicated (would mean a complete overhaul of DisplayObject3D).

Original comment by tim.k...@gmail.com on 8 Aug 2008 at 2:07

GoogleCodeExporter commented 8 years ago
Even after a render, the objects won't rotate in the right direction. See my 
examples here

http://patrick.blitzagency.com/papervision/tests.zip

Original comment by patrickm...@gmail.com on 8 Aug 2008 at 11:31