Hello there.
I am trying to create a game project for a university investigation, and part of it involves creating an FPS setup where the player can press a button and get the camera to ‘lock’ onto an enemy gameobject in the scene.
I have done the FPS tutorial; I am using it as the basis for the project. I have created currently a gameobject called ‘Lockon’ that I would like to get the camera to align to when the button is pressed.
My thought was to modify the MouseLook script to focus in the direction of the object, but I am both having trouble thinking of how to appropriately make a script that handles which object should the camera be pointed at, as well as how to do the camera math to get it to smoothly point towards the object.
Any help or suggestions would be warmly appreciated. Thank you in advance.