I’m working on a HTML5 game and I can set a custom cursor with the DefOS extension. But how do I set a hotspot? The doc only mentions the hotspot for macOS:
I don’t think I know anything similar for HTML5, but you can do something like this:
Hide the cursor by adding this line to your custom CSS (in the body element):
cursor: none;
Make your custom cursor by creating a game object (or a GUI) that follows the mouse position and assign it any sprite you want. This way, you can adjust the pivot of your sprite in the atlas instead of modifying the cursor hotspot.
Here is a quick example: Desktop game.zip (627.6 KB)