Thanks for the post!
A couple of issues to keep in mind:
- The GameObject associated with a NavigationTarget does not usually represent the position of the target. If you use the variable in this way, you may not get what you want.
- RAIN’s various movement components (Motor, Move node) recognize Navigation Targets as movement targets, so you can assign the navigation target itself to your variable.
- You can access a navigation target from the behavior tree in an Expression as navigationtarget(“TargetName”)
- navigation targets can be accessed by name from the global NavigationManager
NavigationTarget tTarget = NavigationManager.Instance.GetNavigationTarget("TargetName");