Polygon rotates inaccurately ?

Godot Version

4.3

Question

Hello,

Not sure if I’m missing something but it appears to me that polygons do not rotate correctly.
This screenshot shows

  • A Polygon2D that is a “flat” horizontal rectangle (0,0 to 5000,5) with a rotation of 30deg (set by editor or code, radian or degree).
  • Several sprites with position.y = position.x/2 , the farthest is x=4000

sin(30) = 0.5 so how are the sprites not on the polygon ? Is there some rounding/snapping with angles ? I don’t find any information about this.

Thanks !

It seems the problem is that your math is off.
position.y = position.x/2 => arctan(0.5) = 0.463… ~ 26.5 deg

Also by setting y to 5 you introduce an additional (albeit very small) ‘rotation’.

True, I was convinced 30deg was the y=x/2 line, probably got confused because I used it before as y=“distance moved”/2. Thanks !