What's the relationship between unit speed (Unit::GetMaxSpeed) and terrain coordinates (Unit::GetPos)?
Is unit speed relative to frame (as time metric)?
How can i calculate unit's approximate (flat straight line) move distance after 300 frames (10 seconds with normal game speed) with Unit::GetMaxSpeed?
Any relationship between Unit::GetMaxSpeed and Unit::GetPos?
Moderators: hoijui, Moderators
Re: Any relationship between Unit::GetMaxSpeed and Unit::Get
MaxSpeed is in elmos (the Spring unit of 1) per frame (30 frames per sec).
GetPos will return the coords xyz in elmos.
So the 10 sec move distance will be GetMaxSpeed*300
GetPos will return the coords xyz in elmos.
So the 10 sec move distance will be GetMaxSpeed*300
Re: Any relationship between Unit::GetMaxSpeed and Unit::Get
Thanks Beherith.
Also got few replies in chat channel (as addon just in case)
Also got few replies in chat channel (as addon just in case)
Code: Select all
GoogleFrog: space is measured in elmos
time is all confused because sometimes it refers to frames
and there are 30 frames a second
but some stuff happens every 32 frames and calls itself per second
Anarchid: there are also heightmap units which are 8 elmos i think
that's not relevant in most gamedev things but it's relevant in aidev