Jump to content
Sign in to follow this  
chronicsilence

Setting UAV heading at waypoint

Recommended Posts

I'm setting a waypoint for my UAV (Darter) via script, using

_wp = group _vehicle addWaypoint [[_xCoord, _yCoord, _zCoord], 0];

When it gets to the waypoint, I need the Darter to be facing a specific direction. I know I can do this instantaneously with setDir, but I'm trying to find a way to have the UAV gradually turn itself to face that direction. I've tried using setFormDir, but that didn't have much of an effect. Any thoughts on how to make the UAV do this?

Share this post


Link to post
Share on other sites

You could maybe use a loop to incrementally change it's direction:

while {direction _uav != _dir} do {

[indent]_uav setDir ((direction _uav) + 1);
sleep 1;[/indent]


};

Run that through a script and see how it looks? Could even change the while condition to < or > depending on what bearing you're coming from/going to.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×