public void ManualUpdate() { if (useNavmesh) { AgentUpdate(); } else { Vector3 targetPosition = gameEntity.GetTargetPosition(); serverTarget = targetPosition; RemoteUpdate(targetPosition); } }
void ServerMove(float y, float spd) { float speed = spd; moveTo = gameEntity.GetTargetPosition() - transform.position; moveTo = moveTo * speed; moveTo.y = -antiBump; moveY -= gravity * Time.deltaTime; moveTo.y = moveY; if (moveTo.magnitude > 0.1f) { characterController.Move(moveTo * Time.deltaTime); } }