How to do this more optimally?

NodeCanvas Forums Support How to do this more optimally?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11984
    yulaw2k
    Participant

    This is a simple if the cube/player enters the spheres trigger collider, the sphere follows the player, if the player exits the sphere collider by running away, the sphere collider moves back to its original position.

    It works perfectly fine, but I am new to behavior trees. I feel my tree is quite a bit messy for something so basic, could anyone offer tips, a screen shot of a much better version, or start a discussion here about an optimal way.

    Attachments:
    You must be logged in to view attached files.
    #11986
    yulaw2k
    Participant

    Here is my updated version as I learn more.

    question-2

    Attachments:
    You must be logged in to view attached files.
    #11992
    Gavalakis
    Keymaster

    Hey,

    Your 2nd tree is indeed better than the 1st 🙂
    I think that you can completely remove the second/middle branch though, and simply have the TriggerStay condition assigned where you now have the “isFollowing == true” condition, unless you want an “isFollowing” variable for other things that you will add down the road.

    If you want some further help, or explanation of the above, please don’t hesitate to ask!
    Thanks 🙂

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

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