Пример #1
0
        private void CarControl()
        {
            Vector3 input          = new Vector3(this.input.x, 0, this.input.y);
            Vector3 targetPosition = transform.position + transform.TransformDirection(input);

            steering.Steer(steering.Arrive(targetPosition));
            steering.FaceMovementDirection();
        }
Пример #2
0
        private void FixedUpdate()
        {
            Vector3 input = inputController.GetInput();

            input.z = input.y;
            input.y = 0;

            TargetPosition = transform.position + transform.TransformDirection(input);
            steering.Steer(steering.Arrive(TargetPosition));
            steering.FaceMovementDirection();
        }