I would like to ask for your advice on how to achieve a specific effect in my game. When the player approaches a certain area and presses a button, the camera should switch to a specific position, and when the interaction is over, it should return to the original view. How can I achieve this effect?
Should I set up multiple cameras and switch between them when the player interacts, or is it better to use just one camera throughout the game? I am currently trying to use just one camera, but because I have used .lookat(player) in my code, it doesn’t feel quite right. I’m not sure how to modify it.
If the NPC faces the character, you can move the camera to a specific position (probably you would like to use the player’s position as a reference) using gsap. The code would look something like this (mine is more for react-three-fiber, but you can get the idea: