Replacing cursor with custom image when playing game in cocos creator?(web desktop)
- Use mouseenter Event to add an image that you want to replace the mouse cursor with.
- To Hide the mouse cursor use this in the main canvas script.
document.getElementById(“Cocos2dGameContainer”).style.cursor = “none”;
- Then use mousemove Event to track where the user is moving the cursor and keep updating each time he moves it.
Thanks for the solution
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.