Cazka / diepAPI

An API for https://diep.io
MIT License
15 stars 8 forks source link

diepAPI.apis.scaling.toCanvasPos() not perfect #49

Closed Cazka closed 1 year ago

Cazka commented 2 years ago

the function works perfectly when the player stands still.

Moving seems to shift the camera, which also shifts the calculated canvasPos

https://user-images.githubusercontent.com/30176357/194759199-cba5f476-d212-4173-a8be-94f65263ee63.mp4

Cazka commented 2 years ago

After some more testing, I can reassure that the issue is not in scaling.toCanvasPos().

I suspect the root cause to be here somewhere: https://github.com/Cazka/diepAPI/blob/main/src/extensions/entity_manager.ts