i am trying to put a mesh into utility layer and add some actions to it. I have created this playground which creates 2 boxes. One is added to the scene and the second one is added to the utility layer scene. Both have same actions registered, however actions registered on mesh in utility layer are not triggered. Also noticed that when i want to rotate camera and i start dragging at the mesh in utility layer then the camera doesn’t rotate.
I am on latest chrome. I was asking whether when you click anywhere but the mesh in utility layer, should utility layer receive pointer event? Try clicking on the mesh on the right (mesh not in utility scene), what event do you have? Do you have PointerOnUtilityScene? I don’t and that is the question. Why are not all pointer events propagated to utility layer scene. When the event happens on some mesh in utility layer only then it is emited for utility layer scene.
@RaananW
I was able to implement what i need, but it seems like i am re-implementing the Actions stuff. Here is updated PG. Would be much better when the actions worked for all scenes. I am currently digging in UtilityLayerRenderer. It detaches the events and handles events in custom way:
// Detach controls on utility scene, events will be fired by logic below to handle picking priority
this.utilityLayerScene.detachControl();
I am trying to understand whats going on in there.
What i understood from the code is that only InputManager and Scene calls ActionManager.processTrigger. So by detaching InputManager from the utility layer scene there is no one left to trigger action on mesh.