From 87ef184ec7e6a96c421ee91227c13eaf9d203357 Mon Sep 17 00:00:00 2001 From: Jason Durand 01 Date: Sat, 2 Apr 2022 13:03:35 -0400 Subject: [PATCH] Forgot to resolve deltaTime to Time.fixedDeltaTime --- Assets/Scripts/Entity.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Entity.cs b/Assets/Scripts/Entity.cs index a1aaa4d..de73b9d 100644 --- a/Assets/Scripts/Entity.cs +++ b/Assets/Scripts/Entity.cs @@ -51,10 +51,10 @@ public class Entity : MonoBehaviour } protected virtual void MoveToTarget(){ - + //Would be nice if we could force this to be in FixedUpdate direction = Vector3.RotateTowards(direction, (target.position - transform.position), rotSpeed*Time.fixedDeltaTime, 0.0f); if(!IsInAttackRange()){ - rb.MovePosition(transform.position + direction * movementSpeed * deltaTime); + rb.MovePosition(transform.position + direction * movementSpeed * Time.fixedDeltaTime); } }