|Topic was automatically imported from the old Question2Answer platform.
I’m trying to make a 2D top-down game, and came across a problem I can’t quite solve.
How to confine a 2D sprite (i.e. sprite cursor, crosshair, etc.) that’s affected a mouse sensitivity to a game window or a viewport so it would leave screen borders?
I’ve tried it with both MOUSE_MODE_CAPTURED and MOUSE_MODE_CONFINED, tried to to clamp the position of a sprite, but ultimately couldn’t find anything that would solve this problem.
I don’t understand the problem clearly
ramazan | 2022-03-24 08:35