Hey guys,
I want to make a camera which rotates around a gameObject.
It works fine, but after the game runs 10 seconds for example it’s twice as fast as it was at the begin.
10 seconds later it’s faster again…
How can I fix this bug - has someone ideas?
Here is the code (It is getting updated every frame…):
Camera.main.transform.position = RotatePointAroundPivot(Camera.main.transform.position,
focusedObject.transform.position,
Quaternion.Euler(0,(float)1 * Time.time, 0));
And this is the function “RotatePointAroundPivat”:
public static Vector3 RotatePointAroundPivot(Vector3 point, Vector3 pivot, Quaternion angle) {
return angle * ( point - pivot) + pivot;
}
best regards deSpeach