News Forums RAIN General Discussion and Troubleshooting 3 days into Rain AI, managed to Patrol couldn't get Mechanim to work[Screenshot]

This topic contains 2 replies, has 2 voices, and was last updated by  Bracer 1 month, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #39648

    Bracer
    Participant

    Hi, I have been trying to understand rain for the past three days, managed to get basic patrol to work, but couldn’t tie it with Mecanim.
    I am using Unity’s standard third person controller assets, hence I know through experiment that setting the forward parameter for the animator beyond one will animate [moving forward/walking/running] the character.

    I filled in the parameters, why isn’t it working ?

    This is the screenshot incase cropped off or scaled down so small text cannot be read.
    http://s2.postimg.org/t5iliagx3/Untitled_2.png

    • This topic was modified 1 month, 2 weeks ago by  Bracer.
    • This topic was modified 1 month, 2 weeks ago by  Bracer.
    • This topic was modified 1 month, 2 weeks ago by  Bracer.
    #39661

    Sigil
    Keymaster

    So the states in the Mecanim Animator are more about single shot kind of animations, like waving. Honestly it’s a hold over from the way the legacy setup did animations, and a better way of doing that style of animation is to use the Mecanim Parameter node and set a trigger or boolean.

    For your purposes, locomotion, you should use the Mecanim Motor. At the bottom it has a drop down that allows you to add parameters to forward to the state machine. For your purpose I would add VelocityZ, and then change the name to Forward to match your state machine. That should forward the current forward velocity of the AI into the state machine, with root motion it is really the attempted velocity forward since we the animation will actually do the movement.

    You may also want to add TurnAngle and rename that to Turn for your state machine, although I would get the forward working first.

    #39662

    Bracer
    Participant

    Thank you Sigil, I used your advise to start my character moving, thank you very much !

    • This reply was modified 1 month, 2 weeks ago by  Bracer.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.