fargo007 Posted February 12, 2018 Share Posted February 12, 2018 (edited) ETA, Apologies, should have posted this in the MOOSE thread. Mods, please relocate if possible. ================================================== Hi, I essentially want to route a water vessel to a point where it will generally intercept another one. Since this is occurring in an OnSpawnGroup() function, as the units to be routed are dynamically spawned with SpawnScheduled() , I don't have the group and unit names available outside it in order to continue re-routing them, such as in a scheduler. So my intent is to collect the heading and coordinate(vec) of the target vessel, and compute a 'predictive' route to an x/y point that will generally result in an intercept. TL;DR: I want to get the present position and heading of a ship, then mathematically compute a point in front of it. If anyone's tackled this or sees a better way to approach it. Perhaps this is a great candidate for another method? e.g. COORDINATE:GetInterceptPoint(Vec2, heading, distance) Where Vec2 is the current position, heading is the direction, and distance is how far away in meters the returned point on the course should be. Return could be a coordinate or one of the pointvec's. The over arching purpose is to route some other unit there. :D Thanks, /Fargo Edited February 12, 2018 by fargo007 wrong forum Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/ Link to comment Share on other sites More sharing options...
Recommended Posts