- Home /
Top down camera
I'm using a modified FPS controller in order to implement a top down camera. I'm using LookAtMouse.js and SmoothFollow.js script in my main camera in order it to follow my character.
It's is working well, but sometimes I need a more precise control for the camera. Now, my cahracter is allways centered in the scene:
My idea is that in some moments (determined by a triger for example), camera changes the focus in something like this:
I don't want to change the angle of the camera, but I still want my character to be followed.
Any idea?
Answer by DaveA · Oct 29, 2012 at 03:31 PM
Have a Vector3 variable like 'cameraOffset' and add that to the camera's position. Zero would be centered, non-zero offset. You may want to work in Viewport coordinates as it's easy to move things like this with that coord system.