Trigger OnPointerOverTrigger when hovering between 2 thin instances

(Copied from Include thinInstanceIndex for OnPointerOverTrigger, OnPointerOutTrigger - #6 by romainE)

Hi,
BabylonJS newbie here (loving it!).

It seems like OnPointerOverTrigger doesn’t trigger when we move the pointer from one thin instance to another without interruption. See this playground as an example: https://playground.babylonjs.com/#3H8B60#3

Would it be possible to add an option for it, if it doesn’t exist already?

1 Like

cc @PolygonalSun to see if he has an idea ?

AFAIK, there isn’t any way to do this already as the actionManager is using the mesh as its reference for its actions rather than the thin instances. I’ll tag @Evgeni_Popov on this just in case.

Hi team, hi @Evgeni_Popov, just checking if there are some ideas on this request?

Here’s a tentative PR:

It adds a pointerOverDisableMeshTesting property to the scene that disables the mesh checking code in the input manager, allowing to differentiate between thin instances in the same mesh.

[EDIT] I have changed the PR to add the property at the mesh level. I think it’s better, this way we can enable the property only for meshes that need it. This PG will work after the PR is merged:

5 Likes

Thanks heaps @Evgeni_Popov , I can the playground’s working now :raised_hands:

1 Like