How make an FSM/Behaviour tree run at FixedUpdate?

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11487
    Anonymous

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

    #11495
    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!

    Join us on Discord: https://discord.gg/97q2Rjh

    #11498
    Anonymous

    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?

    #11499
    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!

    Join us on Discord: https://discord.gg/97q2Rjh

    #11502
    Anonymous

    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.

    #11506
    Gavalakis
    Keymaster

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

    Join us on Discord: https://discord.gg/97q2Rjh

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