I have a 3D display object that I need to scale, this 3D object has clickable Sprites in it. When I adjust the scaleX and scaleY of the object the MouseEvent.Click no longer functions. In fact the mouse acts like there is no object there at all.
I’ve tried adjusting the z value in stead of scaling, and while it solves the mouse detection problem, I’m having issues adjusting the focal length appropriately to keep the perspective the same.
Adjusting the focal point in working fine:
Code:
var newPersX = stageLeft + (defaultPerspectiveX * scaleFactor); var newPersY = stageTop + ((defaultPerspectiveY * scaleFactor) + 25); // var newPersPoint:Point = new Point(newPersX,newPersY); root.transform.perspectiveProjection.projectionCenter = newPersPoint;
its this equation that is off
Code:
root.transform.perspectiveProjection.fieldOfView = (58 + (zpos/(100/3)));
so I either need to find a way to keep the mouse events working when I adjust scaleX and scaleY OR figure out the above equation.
Any ideas?