I am trying to make a First person game in three js. I want the camera to be the players eyes. I am using the orbit controls, using keys on the keyboard for the movement of my player. But the camera is going through objects and I don’t want that to happen. I researched a lot about this issue and majority of people say to use raycaster but I don’t think it will work in my case since I am not seeing the player … the ray would be drawn from the camera which I think would only alert me of a collision when the camera would be inside the object. Also I have not found a single solution to actually stopping the camera (player) from entering the object. I am working with obj imported models which makes it a lot more difficult too.
I am wondering would a physics engine like ammo.lab sort this issue for me?
Thanks for all the help.