So I’m working on a 2D Battle Royale game, similiar to surviv.io, although pretty different. I’ve been trying to get the player to face towards the mouse, using
However, I can’t seem to find a way to get the X and Y positions of the mouse. I’ve taken a look at pretty much everything in the API Refference, but I can’t find anything that works. Here’s the link to my project: https://playcanvas.com/editor/project/594696 You can find the code that I’m working on in the Movement.js script in the Scripts folder.