Page 1 of 1

LUS: StartTurn

Posted: 02 Mar 2017, 22:45
by FLOZi
Along the lines of StartMove and StopMove, feasible or not?

Seems like https://github.com/spring/spring/blob/d ... e.cpp#L591 (for example, no idea if it would be the best place) knows when a turn is happening:
  • would it be called too often to be engine-side call to unit script?
  • Is there overhead if the function is not used within any scripts?
  • Is the best solution to just use polling of heading/direction where required?
Such scripts (polling heading) existed even for OTA but were never terribly good imo.

Re: LUS: StartTurn

Posted: 03 Mar 2017, 00:22
by Kloot
1) probably, units almost never travel in a straight line for more than a few frames because of waypoint spacing
2) yes, but marginal
3) how many units do you expect to be polling per frame, and how often do you need the exact heading per unit?

Re: LUS: StartTurn

Posted: 03 Mar 2017, 08:10
by FLOZi
Knowing when a turn above a threshold began (similar to how exp callin works) would be sufficient. The purpose is for wheel steering animations and things like towed guns that can pivot, so potentially many units are involved but the accuracy is less important than knowing when to initiate.