[Solved] Wrong Mouse Position expression, mouse Won't Update

I got back into GDevelop recently, and can’t do what I want to do as the Mouse.X() and Y() functions won’t work like I think they should, as the in-game cursor I want to ‘replace’ my mouse with, gets stuck in the top left corner and refuses to update to my actually mouse position. Any help is appreciated.

Your setup should work, but regardless, my cursor sprite always goes in the left corner, instead of where my mouse is.

Does the built-in “Custom mouse pointer” example work for you?

It does not work, It seems I may have 2 mouse locations somehow, with 1 invisible one located in the top left corner of my computer, and the other being my true mouse, I don’t think it’s an issue with GDevelop.

Edit: Can’t be above explanation, as my mouse works right for other games, apps, and basically everywhere else.

Unfortunately, as that example and methods work in the engine on the 3 different PCs I’ve tested now, it is going to be something specific to your machine.

Is this a laptop? If so, do you have a touch pad on it?

You’ve got Mouse . X(). Get rid of the dot (’.’). MouseX is a function name. It’s not the X property of a Mouse object.

Ditto the Y co-ordinate.

3 Likes

It worked, I’ve never felt this dumb. Big thanks. :grin:

2 Likes