hello,
I have a project I have started.
I have a player
I have a enemy (rat)
the rat is following me
the player is able to attack the rat by right clicking on it.
the problem im facing is that, when I walk away from the rat like in this picture the mouse coordinates and the rat coordinates on screen are not the same anymore. It gets better when the player and the rat are close.
in the picture you can see that the player is far from the rat and the mouse coordinates and the rat coordinates do not match.
the camera is attached to the player.
this is the print in the picture, and this is just an example the coordinates behave different when I walk left/right. up/down mostly is y axis difference and for left/right it is the x axis.
DEBUG:SCRIPT: Rat world position: | vmath.vector3(99.142646789551, 1147.9205322266, 0) |
---|---|
DEBUG:SCRIPT: Mouse hover at world: | vmath.vector3(99.642837524414, 1256.3607177734, 0) |