views:

235

answers:

1

How do I make a DisplayObject3D have mouseEnabled = false.

I have a Sprite behind the Papervision3D scene listening for mouse events and so i need to let it pick up those mouse events through some of the DisplayObject3D objects.

I've tried adding the DisplayObject3D to a separate ViewportLayer and setting thats mouseEnabled to false but that doesn't seem to work.

Please help!

Thanks.

A: 

Do you need any DO3D objects to pick up mouse events? If not, you could set Viewport3D.interactive = false for your viewport instance. I believe that would let the MouseEvents "pass through".

Alternatively, you could try putting the Sprite in FRONT of the viewport, so they get first crack at the MouseEvents.

yes - there are only some of the DO3D that need to have the mouse enabled false. Putting a sprite in front has the same effect as disabling the viewport. so this doesn't really help me.
Josh
I just coded up an example to examine the problem. Are you able to put an interactive Plane object in the 'back' of your 3D scene? My simple test showed that 3d mouse events will pass through non-interactive D03D's, so if you have a big Plane in the back acting as sort of an 'event backstop', then you should be able to do about the same thing as clicking through to a Sprite behind them. Of course, if you have multiple different Sprites that need to be clickable, then you have have a 3d representation for each of them.