OnAnimatorMove

  • This topic has 0 replies, 2 voices, and was last updated 11 years ago by Gavalakis.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14693
    gotcakes
    Participant

      Hey,

      In 1.5.3 it says we can use OnAnimatorMove in tasks.

      Using 1.5.9 if I add that method to an Action Task in an FSM it doesn’t get called, am I misunderstanding something?

      Cheers!

      #14695
      Gavalakis
      Keymaster

        Hello,

        OnAnimatorMove has been removed from the messager component because it was taking control of Animator component even if you didn’t actually want to use it, because Unity simply looks for whether or not OnAnimatorMove method is implemented.

        If you want to be able to use it, please do the following:

        Open up AgentUtilities.cs and add this anywhere:

        OnAnimatorMove can now be forwarded to your tasks.
        Remember that to listen for a message in your task you need to use the EventListener class attribute. For example:

        I will make AgentUtilities a partial class in the next version so that you dont have to alter the source

        #14694
        gotcakes
        Participant

          Thanks Gav, had previously altered agentutilities but I was missing the eventlistener attribute on the task.

          Works perfectly now, so many thanks

          Cheers!

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.