Well for CloseEnoughDistance, you need to make sure you use the MoveTarget’s CloseEnoughDistance (the move node sets that):
...
// Just an example of what I meant
public override bool IsAt(MoveLookTarget aTarget)
{
Vector3 tDistance = AI.Body.transform.position - aTarget.Position;
if (!Allow3DMovement)
tDistance.y = 0;
return tDistance.magnitude <= aTarget.CloseEnoughDistance;
}
...
As for CloseEnoughAngle, that one should be getting set on your motor properly. The move node sets it to what it needs right before calling Move or Face and then sets it back.
For all the remaining you can just set them to a variable in the behavior tree and check the value wherever you like in your motor. Use an expression in the behavior tree, something like “_allow3DMovement = true”, and do something like this in your motor:
...
public override bool Move()
{
if (!MoveTarget.IsValid)
return false;
Allow3DMovement = AI.WorkingMemory.GetItem<bool>("_allow3DMovement");
Allow3DRotation = AI.WorkingMemory.GetItem<bool>("_allow3DRotation");
AllowOffGraphMovement = AI.WorkingMemory.GetItem<bool>("_allowOffGraphMovement");
// Everything else
}
...