I’m facing a challenge with the camera.onCollide event and could use some guidance. I’m trying to implement logic that triggers whenever the camera collides with any mesh in my scene. The catch is that I don’t know the identity of the “other” mesh involved in the collision.
While some meshes, like the ground, are static and don’t require collision event handling, the performance of my application suffers as the mesh count increases. I’ve already implemented a collider for the more complex meshes, but I’m still experiencing poor performance.
I was wondering if anyone could suggest a better strategy for efficiently detecting the onCollide event? I’m open to any ideas or techniques that could improve the performance of this process.
Thanks in advance for your help!
IMPORTANT! PLEASE REPRODUCE YOUR ISSUE ON THE Playground FIRST!
Before asking a question
- Search about your issue on the documentation. Maybe the problem you have is just a matter of understanding how the API works?
- Search about your issue on the forum. Maybe someone else already had the same problem?
How to ask a good question
-
Write a title that summarizes the specific problem: A good title will help others identify what are you talking about quickly.
- Bad example: Shadow problem
- Good example: Imported meshes on my scene don’t cast shadows
- Bad example: Issue with GUI
- Good example: GUI Button isn’t displayed on VR Session
-
Reproduce your issue on the Playground: This is the MOST IMPORTANT STEP! If we can see what you have tried on the Playground, and what the result of this is, we are much more likely to get what’s going on! And even if your problem is not happening on the Playground, but only on your environment, this already can give us clues what’s going on.
-
Be patient: The team and forum users are all on different time zones, so your question might take a few hours to be seen. We try to answer everything as fast as we can, but remember we’re not robots
Resources