MouseEvent3D when shifting the stage3D position

Software: Away3D 4.x

HankTurbo, Newbie
Posted: 08 October 2012 05:03 AM   Total Posts: 11

Hiya,

I have a sphere on the stage and on that sphere I have a MouseEvent3D.CLICK.

I want my Stage3D to center on stage so therefore I reposition it across the screen using stage3DProxy.x and stage3DProxy.y.

When I reposition the stage the mouseevent bounding box stay behind, meaning that if I position the stage3DProxy.x to f.ex. 50, then the mouseevents on the sphere work 50 pixels to the left of where the sphere actually is.

Is there a way to reposition the bounding box of the sphere so it works correctly?

Thanks!

   

HankTurbo, Newbie
Posted: 10 October 2012 12:53 AM   Total Posts: 11   [ # 1 ]

Anyone?

Or have I not explained myself properly?

   

thatflashdude, Newbie
Posted: 10 October 2012 05:19 AM   Total Posts: 19   [ # 2 ]

its probably not a good idea to move the entire stage3d layer
perhaps you can throw the sphere in a container3D and center that within your parameters?

   

HankTurbo, Newbie
Posted: 10 October 2012 10:22 AM   Total Posts: 11   [ # 3 ]

Thanks for the answer.

I initially tried re-scaling the stage3D stage to fit the screen, but I had weird effects with the 3D. It would not scale properly (aspect ratio would change++), so I therefore changed it to be fixed size and centered in the flash. If you have any code that would help me resize the Stage3D area / view correctly I would be much obliged to centre the whole object on stage in stead.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X