papervision3d – pixel precision – formula bug

Bartek wrote a great article here about showing e.g. an 400×300 px image in the same size in papervision3d.

I used it a lot, but now I might have found a bug. When you are working with a postive camera.z the Math.abs won’t work:

use:
var targetZ1 : Number = (camera.zoom * camera.focus) – (camera.z*-1);
instead of:
var targetZ1 : Number = (camera.zoom * camera.focus) – Math.abs(camera.z);

Barteks page is great! Have a look at it.

 

Leave a Reply

Formatting: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">