Closed islamelnabarawy closed 6 years ago
Turns out this was due to the fact that the size of the minimap is even, and when getting the center I was rounding down the 0.5. When I get the ceiling instead, the issue doesn't happen.
In case anyone else runs into the same problem, the solution is to round up instead of down when calculating the camera position using the camera
feature. That gets rid of the issue.
Summary: The
camera_move
action introduces inaccuracy between the center of thecamera
feature in theminimap
and the point that was passed as an argument tocamera_move
. The bigger the map, the more inaccurate it gets.This jupyter notebook illustrates the issue.
The inaccuracy is probably coming from the way the
camera
feature layer itself is generated, but it manifests very clearly when the center of thecamera
rectangle is used as an argument tocamera_move
.Steps to reproduce:
camera
feature from theminimap
to calculate the center of thecamera
rectangle on the minimapcamera_move
action to move the camera to that calculated pointExpected result:
camera
feature should remain unchanged.Actual result: