Leave Turning rate (and stationary turning rate) at a value Greater Than 500, slowing turning rates can only hurt the turning arc.
Here are the settings I have for my viking at the moment (nothing else has been edited for this viking, start a fresh map and make these 4 adjustments in the movement tab).
Speed = 5
Accel = 5
Decel = 1
Lat Accel = 1
Here is an explanation of how these values function with one another.
Deceleration:
Deceleration is the value of which the unit lose speed until its destination is reached. Deceleration does not start until the final moments of the unit's journey to its destination. It seems that deceleration starts at a distance of x = (s^2)/(2d) from the end of the destination, where s = max speed (or highest speed reached in journey*) and d = deceleration and x = arc length of the deceleration curve (even if its a straight line). This occurs over (s/d) seconds.
In the case of turning in an arc, deceleration is how a unit will slow down and mathematically corresponds to the decrease in the radius of the arc over time when approaching its destination. This implies that if the unit has a deceleration of 0 will never experience a decreasing radius in its travel arc, and thus will never reach its destination and will continually orbit about its destination. Therefore the deceleration value must be NON-ZERO to avoid a continuous orbit.
Lateral Acceleration:
Lat Accel will determine the radius of the turning arc corresponding to the unit's maximum speed. The values are inversely proportional. The higher the lateral accel, the smaller the major radius or the arc. The higher the maximum speed, the greater the major radius of the arc. The deceleration determines the rate at which the major radius shrinks to zero. The major radius is the distance from the unit to its destination once it starts turning.
Acceleration:
Sometimes your unit will reach a top speed in its journey that is less than its maximum speed. This is because the deceleration started to kick in to bring your unit to a halt before it even reached its top speed, in this case the Maximum speed changes to the lower maximum attained speed in the equations. This is why we don't rush at red lights at 70 mph and hit our breaks 10 feet away.
Significantly low acceleration values can actually cause the major radius to grow or remain the same instead of shrink and when the New Major radius is achieved (largest distance between unit and destination) then the decline of the major radius to zero will start in a normal fashion according to your deceleration.
In general keep lat accel and decel greater than 1 and acceleration greater than 2. We do this so division by zero (inverse proportional relationships asymptote to zero and infinity) or at least near division by zero doesn't create strange results. Your max speed can be anything you want, although I suggest a max speed of at least 3.
Feel free to add/change what I've written, I determined these things by eye and spreadsheets.
EDIT:
When a unit is ordered to a destination that will require it to change the direction in which it is turning (clockwise to counter clockwise or vice versa), and the angle (relative to its CURRENT FACING) exceeds 135 degrees, the game will bug an redraw the arc as if the unit started at rest (speed = 0).
Overcame the above bug using triggers to interpolate the proper path that the unit should take and orders the unit to these points in a successive fashion. Will update with how to do this later ( still working out the fine details). I'm working all day today so I update this. Anyway I've learned a lot more about moving units in an arc since the original date of this post.
This is something I have been interested in doing for some time and keep looking up. Its the best and most successful method so far.
However, it still has one issue that was also shared with the other methods: If you order the unit to move to a point directly behind itself, it will instantly turn around instead of moving in an arc. This kind of ruins the effect, because the main point of it for me was to make sure large machines like tanks where moving down a narrow alley, they would be unable to turn around.
From the sounds of it, you may have found a way to overcome this bug - but you never posted it. Any help?
Thanks!
----------------------------------------
The answer:
Yes there is a way, when unit it issued to move to any point more than 135 degrees clockwise or counter clockwise from it's current facing, this bug will occur.
There is a work around for SOME/MOST situations. You can detect any such order and redirect the order to go to any point 134 degrees in the direction of the original order, wait for the new destination to be reached (or nearly reached, see below), then apply the the move order again to the original destination.
The best way to detect whether or not you are at NEW destination is to use two parameters. Current facing relative to the new point AND current distance. If your unit is less than 2 units from the new destination and is facing no more than 30 degrees from the new destination, it's safe to apply the new move order to the original destination. You would have to check this condition every 0.1 seconds. Once both are satisfied, issue the order to original destination,.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Contrary to many comments here (on the mapster forums), you do not need any Host Site operators to make a unit turn in an arc.
You only need to adjust the following values appropriately corresponding to one another in respect the the turning arc you wish to create.
Unit -> Movement -> Fields
Speed Acceleration Deceleration Lateral Acceleration
Leave Turning rate (and stationary turning rate) at a value Greater Than 500, slowing turning rates can only hurt the turning arc.
Here are the settings I have for my viking at the moment (nothing else has been edited for this viking, start a fresh map and make these 4 adjustments in the movement tab).
Speed = 5 Accel = 5 Decel = 1 Lat Accel = 1
Here is an explanation of how these values function with one another.
Deceleration: Deceleration is the value of which the unit lose speed until its destination is reached. Deceleration does not start until the final moments of the unit's journey to its destination. It seems that deceleration starts at a distance of x = (s^2)/(2d) from the end of the destination, where s = max speed (or highest speed reached in journey*) and d = deceleration and x = arc length of the deceleration curve (even if its a straight line). This occurs over (s/d) seconds.
In the case of turning in an arc, deceleration is how a unit will slow down and mathematically corresponds to the decrease in the radius of the arc over time when approaching its destination. This implies that if the unit has a deceleration of 0 will never experience a decreasing radius in its travel arc, and thus will never reach its destination and will continually orbit about its destination. Therefore the deceleration value must be NON-ZERO to avoid a continuous orbit.
Lateral Acceleration: Lat Accel will determine the radius of the turning arc corresponding to the unit's maximum speed. The values are inversely proportional. The higher the lateral accel, the smaller the major radius or the arc. The higher the maximum speed, the greater the major radius of the arc. The deceleration determines the rate at which the major radius shrinks to zero. The major radius is the distance from the unit to its destination once it starts turning.
Acceleration: Sometimes your unit will reach a top speed in its journey that is less than its maximum speed. This is because the deceleration started to kick in to bring your unit to a halt before it even reached its top speed, in this case the Maximum speed changes to the lower maximum attained speed in the equations. This is why we don't rush at red lights at 70 mph and hit our breaks 10 feet away.
Significantly low acceleration values can actually cause the major radius to grow or remain the same instead of shrink and when the New Major radius is achieved (largest distance between unit and destination) then the decline of the major radius to zero will start in a normal fashion according to your deceleration.
In general keep lat accel and decel greater than 1 and acceleration greater than 2. We do this so division by zero (inverse proportional relationships asymptote to zero and infinity) or at least near division by zero doesn't create strange results. Your max speed can be anything you want, although I suggest a max speed of at least 3.
Feel free to add/change what I've written, I determined these things by eye and spreadsheets.
EDIT:
When a unit is ordered to a destination that will require it to change the direction in which it is turning (clockwise to counter clockwise or vice versa), and the angle (relative to its CURRENT FACING) exceeds 135 degrees, the game will bug an redraw the arc as if the unit started at rest (speed = 0).
@EdwardSolomon: Go
Overcame the above bug using triggers to interpolate the proper path that the unit should take and orders the unit to these points in a successive fashion. Will update with how to do this later ( still working out the fine details). I'm working all day today so I update this. Anyway I've learned a lot more about moving units in an arc since the original date of this post.
See, now THIS is fantastic stuff.
I've been trying to figure this one out for like, half a week now.
Any new information would be amazing, as this particular aspect of movement is critical in a project I'm working on.
I salute your genius!
@TheHorribleFatshark: Go
Here is a private message from a user.
Hey,
Was reading your guide, How to make units turn in an arc. (http://www.sc2mapster.com/forums/resources/tutorials/23657-guide-how-to-make-units-turn-in-an-arc/#p1)
This is something I have been interested in doing for some time and keep looking up. Its the best and most successful method so far.
However, it still has one issue that was also shared with the other methods: If you order the unit to move to a point directly behind itself, it will instantly turn around instead of moving in an arc. This kind of ruins the effect, because the main point of it for me was to make sure large machines like tanks where moving down a narrow alley, they would be unable to turn around.
From the sounds of it, you may have found a way to overcome this bug - but you never posted it. Any help?
Thanks!
----------------------------------------The answer: Yes there is a way, when unit it issued to move to any point more than 135 degrees clockwise or counter clockwise from it's current facing, this bug will occur.
There is a work around for SOME/MOST situations. You can detect any such order and redirect the order to go to any point 134 degrees in the direction of the original order, wait for the new destination to be reached (or nearly reached, see below), then apply the the move order again to the original destination.
The best way to detect whether or not you are at NEW destination is to use two parameters. Current facing relative to the new point AND current distance. If your unit is less than 2 units from the new destination and is facing no more than 30 degrees from the new destination, it's safe to apply the new move order to the original destination. You would have to check this condition every 0.1 seconds. Once both are satisfied, issue the order to original destination,.