예제 #1
0
 public void ManualUpdate()
 {
     if (useNavmesh)
     {
         AgentUpdate();
     }
     else
     {
         Vector3 targetPosition = gameEntity.GetTargetPosition();
         serverTarget = targetPosition;
         RemoteUpdate(targetPosition);
     }
 }
예제 #2
0
            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);
                }
            }