MouseEvent3D problems on rendering multiple views.

1 view
Skip to first unread message

Li

unread,
Aug 10, 2008, 7:08:51 PM8/10/08
to away3d.dev
I ran into a problem that even though may seem to be very specific for
a given application, would be important to resolve. It seems that
alternated renderings of more that one view messes up MouseEvent3D
events.

My particualar situation:
Im using two viewports on top of each other. One viewport is used
normally, and the second viewport is used with a second camera to
produce a reflection. The second camera is positioned at every moment
exactly opposite to the first camera, and the second viewport is
flipped and rotated in order to generate the reflection effect.
Besides the details of how this is achieved, the important thing to
note here is that this implementation involves alternate calls to each
view's render method, and this automatically messes up mouse events on
the scene. For instance, mouse over events on 3d objects are called
repetively, even though the mouse remains still on top of it.

Here is some data that might be useful to somebody interested in
resolving this:

- mouseEnabled = false on the second view doesnt solve the problem, it
simply stops this from happening on the reflection itself.
- view.mouseZeroMove doesnt seem to do anything.
- If the REFLECTION view is rendered with a bitmap session and then
the MAIN view is rendered with a sprite session, I get the alternating
mouse events situation.
- If the MAIN view is rendered with a sprite session and then the
REFLECTION view is rendered with a bitmap session, the main view
becomes invisible, even though it is contained in a higher layer
sprite.
- If the MAIN view is rendered with a bitmap session and then the
REFLECTION view is rendered with a bitmap session, interaction is
lost, although hand cursors still appear (click events dont do
anything).
- If the REFLECTION view is rendered with a bitmap session and then
the MAIN view is rendered with a bitmap session, the same results as
case 1 are obtained.

What is happening is confusing, but I guess that if you have an
understanding of how the engine works overall, you might have an idea
of what is happening. I imagine that the solution would be to merge
the two renderings into one, or perhaps setting up something in the
canvas of the two views so that mouse events dont block each other...

Li

unread,
Aug 12, 2008, 8:32:19 AM8/12/08
to away3d.dev
Let me sinthesize the problem in two questions:

Is there a way to merge two renders in one?
- When a view is rendered, elements are first cleared, and then drawn.
If Im rendering two views, what happens is view 1 is cleared, then
drawn and then view 2 is cleared, then drawn. What Im talking about
here is clear view 1 and 2, and then and only then draw view 1 and 2.

Who calls the 2d interactive clip with blendMode ALPHA in a view?
- When an object3D is rolled over, and invisible clip is brought to
the display to simulate mouse events. As the mouse moves over the 3d
object, this invisible clip is repositioned and scaled so that the
mouse position in the 3d object's surface coincides with that of the
2d invisible clip. As my 2 views are being called alternated, Im
loosing the invisible clip from display, so, is there any way to force
its call again?
Reply all
Reply to author
Forward
0 new messages