How make an FSM/Behaviour tree run at FixedUpdate?

Forums 💬 NodeCanvas ⚙️ Support How make an FSM/Behaviour tree run at FixedUpdate?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #18330
    anonymous
    Participant

      How make an FSM/Behaviour tree run at FixedUpdate, my game involves physics.

      #18335
      Gavalakis
      Keymaster

        Hello,

        Are you referring to making custom scripted actions run in FixedUpdate, or updating the whole graph in FixedUpdate?
        Generally speaking is not really advisable to update everything in FixedUpdate, but rather only physics related things that specifically have to do with rigidbody.

        Taken from the Unity docs for your convenience, states that:
        FixedUpdate should be used instead of Update when dealing with Rigidbody. For example when adding a force to a rigidbody, you have to apply the force every fixed frame inside FixedUpdate instead of every frame inside Update.

        Please let me know what is the case.
        Thanks!

        #18334
        anonymous
        Participant

          Making custom scripted actions run in FixedUpdate.
          For example in the FSM Super Action, has only Update, what are my options if i want to run a function in the FSM or Behaviour tree at FixedUpdate?

          #18333
          Gavalakis
          Keymaster

            Hey,

            Here is an example of the way to use FixedUpdate in a custom ActionTask:

            Let me know if that works for you.
            Thanks!

            #18332
            anonymous
            Participant

              That is exactly what i need.
              Would be nice something like this in the documentation page in case of someone has the same doubt.
              Thank you.

              #18331
              Gavalakis
              Keymaster

                Great. Glad this works for you.
                I’ve added this info in the documentation now 🙂

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