Action manager vs event listeners

Hello, I was wondering if someone here can tell me which would be a more optimal approach, to use between ActionManager or regular events.

I have a bunch of meshes in a scene that need to activate on certain triggers(click, hover etc) and I was wondering if using an Action Manager to handle all the interactions is better than having an event listener and checking them with a raycaster?

Also if anyone has any other suggestions, please let me know. Thanks!

Hello and welcome to the Babylon community! :smiley:
The ActionManager uses picking behind the scenes, so there’s no performance difference between them. If you’re worried about picking performance, I just answered a topic about that, you can check it here: Accelerating structures for raycasting against mesh objects - Questions - Babylon.js (babylonjs.com)

2 Likes

Thanks for the help! :smile:

1 Like