Anuken / Mindustry

The automation tower defense RTS
https://mindustrygame.github.io
GNU General Public License v3.0
22.55k stars 2.95k forks source link

Logic @rotation inaccurate #9768

Closed JasonP01 closed 5 months ago

JasonP01 commented 5 months ago

Platforms

Windows

Build

146

Issue

When sensing @rotation in a player unit, while the unit is facing right or left the logic prints 9.12915 or 179.136136 respectively (decimals inaccurate here)

Steps to reproduce

Sense @rotation from a player unit and move left or right on Desktop, the rotation is not set to 180 or 0

Mods used

No response

Save file

No response

(Crash) logs

No response

Submission

Anuken commented 5 months ago
Screenshot 2024-04-22 at 8 46 50 AM

You misread the value.

the rotation is not set to 180 or 0

That is not how floating point numbers work.