ocraft / ocraft-s2client

StarCraft II Client - Java library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
55 stars 15 forks source link

On map debug text does not work #16

Closed ShadowLordAlpha closed 5 years ago

ShadowLordAlpha commented 5 years ago

The 3d DebugInterface#debugTextOut() appears to be nearly an identical copy of the 2d version and throws the following exception when attempting to run with a point on the map and not on the screen.

Exception in thread "main" java.lang.IllegalArgumentException: virtualized point 2d [x] has value 29.002588 and is greater than 1.0

I assume this is because for the point it is using on() instead of onMap() from the TextPositionSyntax but have not yet confirmed this

ShadowLordAlpha commented 5 years ago

I have not dug into the library itself but with a bit of reflection the following code does print out on the map as expected

text.add(DebugText.text() .of("ResourcesPrincess") .withColor(Color.WHITE) .withSize(18) .onMap(location.add(Point.of(0,0,1))) .build());

ShadowLordAlpha commented 5 years ago

nope, I did a dumb and was somehow on an old version. Sorry about that