Why does the custom mouse cursor disappear whenever I move the camera?

When I move the camera (WASD) the custom mouse cursor suddenly moves offscreen. How do I fix this?

I’m on mobile rn so I can’t check but I believe this should solve your issue.

In the Cursor object, select the MouseMove behavior and set it to “Use game coordinates”

1 Like

It is set to that already

I believe it is because you are setting mouse move to position AND moving the object with velocity, so it will jank back to it’s original spot.

Lemme keep looking, though.

Thanks! keep me updated with what you find

I’m can’t test what’s wrong because I’m still on mobile, but it looks like it should work fine? Also I recommend cleaning your code a lot with bundles and behavior placement, rn it’s very hectic.

@Mason_Zane you should add a border around the game so the Chickens and Humans cant go off screen

1 Like

Alright sounds nice have you hade any issues with the cursor?

No seems to work fine.

The mouse is in GUI so it moves with the screen… I think that is the problem. It is trying to move with the screen and add in the positions.

Ok so how should I fix this?

Move the cursor to the Game World layer (with collisions off)

1 Like

Ok ill do that right now

Yup. And I can’t really test if this works because it won’t save changes. I can’t use the message block.

Is there a way to make game world elements apear above the UI elements or no?

No, there is not.

Technically you could change the cursor to “Use Screen Coordinates” and it would work, but the X,Y values that are being using in the spawn would not work. Meaning you would need to using an Expression to fix this.

It’s not hard to do, but you should clean your code a lot before you do this.

How should I go through cleaning my code without ruining anything?

It would take a bit of reworking, but using bundles is a good way to start.
For example, if you look at some of the games on the Flowlab homepage, you’ll notice a lot of the games will use bundles and bundle inputs/outputs to organize code.

Also typically try to avoid backwards wires

Alright. Thank you to everyone who helped me with the mouse problem and gave me extra tips im very grateful! And hopefully someday this game will be amazing. Once again thanks y’all

2 Likes

You could (if you dont already) make a devlog forum for your game @Mason_Zane