Forgot to resolve deltaTime to Time.fixedDeltaTime
This commit is contained in:
parent
1112e06d47
commit
87ef184ec7
@ -51,10 +51,10 @@ public class Entity : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void MoveToTarget(){
|
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);
|
direction = Vector3.RotateTowards(direction, (target.position - transform.position), rotSpeed*Time.fixedDeltaTime, 0.0f);
|
||||||
if(!IsInAttackRange()){
|
if(!IsInAttackRange()){
|
||||||
rb.MovePosition(transform.position + direction * movementSpeed * deltaTime);
|
rb.MovePosition(transform.position + direction * movementSpeed * Time.fixedDeltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user