The ActionManager registered by sprite is not compatible with the ActionManager registered by the model. When there is a model after sprite, only the mesh’s ActionManager will be triggered. I can trigger the event of whoever I want to click or move in. Even if I increase the renderGroupId of SpriteManager, it still cannot be triggered first
I would recommend in your case to have the sprite in a second scene so you can decide what order you want to use:
Sprites Examples | Babylon.js Playground (babylonjs.com)
1 Like
Your case is a very good solution, more concise than mine. I already solved this problem yesterday. I prioritized the sprite event in the global event and compared the last recorded sprite with the current sprite to determine whether to move in or out of the event. Although it was a bit more complicated, it was still considered a solution
The actionManagerial. hasSpecificTrigger method can notify registered events, so I can maintain a set of event handling logic
You’re amazing, I plan to use your plan
1 Like