Fixed Rotation

This commit is contained in:
GamerClassN7 2022-01-29 00:26:31 +01:00
parent a1e47bd02d
commit 8a8e19cf12

View File

@ -58,7 +58,8 @@ public class PlayerController : MonoBehaviour
if (this.collisionGameObject != null)
{
transform.rotation = Quaternion.Slerp(transform.rotation, this.collisionGameObject.transform.rotation, Time.deltaTime * 1.0f);
Quaternion tempRotate = new Quaternion(transform.rotation.x, transform.rotation.y, this.collisionGameObject.transform.rotation.z, transform.rotation.w);
transform.rotation = Quaternion.Slerp(transform.rotation, tempRotate, Time.deltaTime * 1.0f);
}
rb.MovePosition(rb.position + moveDirection);