News Forums RAIN General Discussion and Troubleshooting How to evaluate distance in BT?

This topic contains 1 reply, has 2 voices, and was last updated by  Shimakaze 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40352

    AdamR
    Participant

    I’m probably being thick here but is there a simple way to create a distance check in a constraint node?

    Do I have to enter the equation for the distance between two points as the expression to evaluate? This seems a bit harsh.

    I could create an action that does this, but then I can’t really use it for control flow of actions unless its put in a sequencer, but this also seems not ideal.

    Is the correct way to create a highly specific subclass of the constraint?

    #40359

    Shimakaze
    Participant

    You can write your distance constraint by inheriting RAINDecision.
    _children is all child nodes of decision node, and you can do everything now.

    Call node.RUN() can play the node.
    Note that you need care playing order of RUNNING state node under your decision node.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.