I’m currently facing some confusion regarding the implementation of native collision detection and the usage of a physics engine for camera movement in my project. Specifically, I’m trying to achieve camera movement using the WSAD keys while allowing the camera to interact with imported meshes by “picking” items upon collisions. These items can vary in type and quantity and are randomly distributed within the scene.
To enable collision detection between the camera and meshes, I have set the
checkCollisions property to
true. However, I’m encountering significant performance issues when the picked mesh is relatively large. This issue disappears when I have
checkCollisions enabled for the imported meshes.
I have employed the
camera.onCollide event to handle the collisions. Nonetheless, I’m seeking guidance on the optimal approach for this specific use case of camera movement and collision detection with objects.
My questions are as follows:
a. What would be the preferred strategy or best practice for implementing camera movement while colliding with objects, taking into consideration the requirement to “pick” items upon collision?
b. Is there a way to define a physics body when utilizing
Any insights, suggestions, or solutions regarding these matters would be highly appreciated.
Thank you all in advance for your time and expertise.