Camera rotation
Hello! I'm working on a ball rolling game, and i'd like to move my camera in a circular way around my sphere character with the arrow keys while it moves, but i couldn't do it on my own, and i couldn't find a working code for it. Can someone help me figure it out? Thanks in advance!
Answer by xxmariofer · Jan 21, 2019 at 04:21 PM
You can use the https://docs.unity3d.com/ScriptReference/Transform.RotateAround.html first the target positio, second the axis you want to be rotating arround and third the speed, just make sure it only enters that method when your input.getkey are being pressed and thats it.
Answer by frost1945 · Jan 21, 2019 at 04:42 PM
The camera is rotating, but not in a circle around my sphere object so this isn't working. Picture of the sphere sliding off the screen