package leenkx.logicnode; import iron.math.Vec4; import leenkx.trait.navigation.Navigation; class NavigableLocationNode extends LogicNode { var loc: Vec4; public function new(tree: LogicTree) { super(tree); } override function get(from: Int): Dynamic { #if lnx_navigation assert(Error, Navigation.active.navMeshes.length > 0, "No Navigation Mesh Present"); Navigation.active.navMeshes[0].getRandomPoint(function(p: Vec4) { loc = p; }); #end return loc; } }