How to Target Enemies using Free Animations/Controller - Skyrim-Like Skill System Part 5

Поділитися
Вставка

КОМЕНТАРІ • 3

  • @FeedMyKids1
    @FeedMyKids1  4 роки тому +1

    If (while strafing without a target) you want the character to look in the direction you were facing when you first start strafing:
    Change CurrentLookDir (in RPGCharacterMovementControllerFREE) to
    private Vector3 CurrentLookDir => transform.forward + transform.position;

  • @KampinKarl1
    @KampinKarl1 4 роки тому +1

    Could you tell me how to strafe left and right without a target?

    • @FeedMyKids1
      @FeedMyKids1  4 роки тому +1

      Yes. My bad for not doing it this way originally:
      In RPGCharacterMovementControllerFREE.cs
      on the CurrentLookDir property,
      remove the "new Vector3 (Input.GetAxisRaw("Horizontal"), 0, Inpunt.GetAxisRax("Vertical")) + transform.position".
      Replace it with
      "transform.forward + transform.position".
      Final product should look like:
      private Vector3 CurrentLookDir => transform.forward + transform.position;
      That's it. Sorry again for not doing it that way in the first place.