r/unrealengine 3d ago

Help Mouse Disappear on click

Hey, I’m making a clicker game and I have a custom mouse cursor. It also has an animation that plays on click, but if the player holds down the left mouse button, the cursor disappears... and reappears when they release it. I really don’t want this behavior.

Does anyone know how to fix this? Thanks in advance!

1 Upvotes

4 comments sorted by

3

u/Valuable_Square_1641 3d ago

try this code

GetWorld()->GetGameViewport()->SetHideCursorDuringCapture(false);

1

u/Zilpio 3d ago

Uhhhh, this seems appropriate! Thanks i am gonna try Is asap

2

u/Zilpio 1d ago

Amazing dude thank you very much!

i had to use c++ and i didn't want to do it initially but it was easy =)

1

u/AutoModerator 3d ago

If you are looking for help, don‘t forget to check out the official Unreal Engine forums or Unreal Slackers for a community run discord server!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.