Player Camera affects Joystick UI

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

How do I…

I have player object in Player Layer and a floating Joystick in its own UI Layer. The player has camera center action applied to it. But when I move the player with joystick, joystick UI gets left behind and also appears in random places instead of the place where touch have just happened.

What is the expected result

The Floating Joystick should remain on the screen from where the touch has started.

What is the actual result

First of all, Joystick should appear in the place I’ve clicked or touched. But it appears far from touched point. The objects in UI layer also doesn’t appear in the exact place that I’ve kept in.

Related screenshots

I’ve included screenshot of preview window and event screen.

Project files (optional)

Insert a minimal game showing your issue in a .zip or .rar.

I think rather than centering you should use the smooth camera extension and put that joystick into a different layer

I don’t know how this got missed 4 months ago. Here’s another very late reply.

The issue is because the MouseX() and MouseY() layer parameter isn’t specified in the first actions of this event:

If you don’t specify the layer parameter of the MouseX() and MouseY() functions, then the base layer is used by default. You’ll need to add “InGameUI” to the two functions.