So recently I’ve been implementing a pause function into my game and I’ve noticed that basically the only framerate independent function of my game is the rotation of my characters. This is how I am rotating my characters.
public void rotateMe (Vector3 lookDir, string playerName) {
Quaternion lookRot;
switch (playerName) {
case "P1":
lookDir.z *= -1;
lookRot = Quaternion.LookRotation(lookDir);
transform.rotation = lookRot;
break;
case "P2":
lookDir.x *= -1;
lookRot = Quaternion.LookRotation(lookDir);
transform.rotation = lookRot;
break;
}
}
So when I pause my game by setting the time scale this particular value doesn’t pause. So the characters are still rotating around. Is there an easy way to express TIme.deltaTime to a quat? That seems to be giving me errors. Any help is most apprecaited.