• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Unit turning mechanics.

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Posting this as someone asked me to investigate it so might as well store the results somewhere more appropriately than on their user profile.

Object editor unit Movement - Turn Rate is in radians per internal frame. WC3 runs at an internal frame rate of 1 / 0.03 (~33.3...) frames per game second. A Turn Rate of 0.01 in the object editor corresponds to an actual turn rate of 19.1 degrees per game second. Note that this is relative to game time and not real time, the ratio of which is defined by game speed.

To put it in perspective the Blood Mage hero has a base Turn Rate of 0.5. This means it has a theoretical turn rate of 954.9 degrees per second, so should turn approximately 2.65 full revolutions per second. In theory only however...

The maximum physically possible turn rate is ~381.95 degrees per second, measured in game. This means that turn rate values above 0.20 in the editor should be pointless. However units rotation uses some basic physics controlled by the field Art - Orientation Interpolation meaning it has both acceleration and deceleration. With a value of 0.20 it may never accelerates fast enough to reach the maximum rotation speed of ~381.95 degrees per game second before it begins deceleration. This means that values above 0.20 do increase rotation rate only by increasing rotation rate acceleration and not the actual maximum rotation rate.

Trigger turning a unit without a specified time seems to use some arbitrary, high value turn rate (greater than 0.20). Even with a time specified and set to be a very small value it is still limited to ~381.95 degrees per game second or ~0.20 radians per frame.

The Art - Orientation Interpolation field seems to have strange mechanics, almost like it is choosing a behaviour rather than setting a value. At a value of 0 units instantly reach the maximum rotation rate with some minor over/under shooting at desired facing. At 1 units can reach half rotation rate, 0.1, in my tests. Starting with 2 it becomes some kind of acceleration/deceleration mechanic.

Of other note is this research backs why people say use 0.03 second timeouts for trigger enhanced abilities. Unit rotation updates exactly every 0.03 game seconds, no more no less. I would not be surprised if the entire Warcraft III engine worked like this.
 
Last edited:

Deleted member 219079

D

Deleted member 219079

Do you have info on how the "Art - Orientation Interpolation" affects unit turning?
 
nohow, its purely visual turn speed which doesnt affect real turn speed. basically you can walk backwards with that but actually ur facing angle perfectly fine, its just model get sloppy
In sliding maps units are moved periodicly and ordered to face certain angle with triggers. The turning while sliding may require one to be very precise with mouse clicks, to make new turning, for example when you circle at a straight line. When changing "Art - Orientation Interpolation", it does have effect on turning rate, and I can't do the same moves while sliding, as I could do with an other "Art - Orientation Interpolation" value. The change is not very much, but it's significant for me that I feel a technical change. Setting the value to "0" is good, and setting the value to "5" is bad for the turning control. That is at least why I, and many other people experience for many years.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
The Art - Orientation Interpolation field does alter rotation mechanics. It seems to control the rotation rate acceleration physics. 0 Means off so the unit hits maximum rotation rate instantly. 1 seems similar to 0 but limits to only half rotation rate. Values above that seem to apply various smoothing curves.
 
Last edited:
Level 6
Joined
Sep 7, 2017
Messages
207
This is very helpful, Doc. ^^ Glad you documented this stuff very well. It will add realism and beauty to one's maps. :)
Will practice these information on these days.
 
Status
Not open for further replies.
Top