jroosterman Posted July 17, 2017 Share Posted July 17, 2017 I have a group of meshes that have OnPointerOverTrigger events. When I mouse over them the event triggers. However, when I mouse over them while they are behind another object that has no events, the OnPointerOverTrigger still triggers. Is there a simple way to make OnPointerOverTrigger not trigger when the mesh is behind another mesh? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 17, 2017 Share Posted July 17, 2017 Hello ! by default the scene uses this predicate to check meshes for triggers: scene.pointerMovePredicate = function(mesh) { return mesh.isPickable && mesh.isVisible && mesh.isReady() && mesh.isEnabled() && (this.constantlyUpdateMeshUnderPointer || (mesh.actionManager !== null && mesh.actionManager !== undefined); } Feel free to update it to remove the actionManager check: this way all meshes with isPickable will process the onPointerOver and you will get what you need jroosterman 1 Quote Link to comment Share on other sites More sharing options...
jroosterman Posted July 17, 2017 Author Share Posted July 17, 2017 Thanks, I'll give that a shot. Quote Link to comment Share on other sites More sharing options...
issabln Posted September 6, 2019 Share Posted September 6, 2019 hi @jroosterman did you solve this? Quote Link to comment Share on other sites More sharing options...
Guest Posted September 26, 2019 Share Posted September 26, 2019 Please post your question on the new forum:https://forum.babylonjs.com/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.