How to stop player moving on interaction with actor item?

I have an actor “item” that shows an info image when player is overlapping and press a button, my question is:
How can I make the player stop moving when interact with the actor, but it keep the rotation? I mean, player press a button to show an image, when actor is showing the image, player stop moving but keep rotation to see around. when player press again the button to hide the image, it recovers the movement. is possible do that?

I have a HUD blueprint to create a widget “UI gestor” and an actor “Item” that shows info in the game

HUD bluerpint

Actor Blueprint (image changed, the past image had a wrong node connection)

A bit of strange setup you got there but ok lets work with that.

First create a bool inside your Character (or Controller depends were you have your Movement Input) name it BlockMovement.

After your “Add to Viewport” Get your Character and Cast it to “Whatever your actual Character is” (or Controller) drag a wire out and type Set BlockMovement you should be able to set the bool now. Make sure its Checked / true. Do the same after your “Remove from Parent” Node but this tim make sure to Uncheck/false the bool.

Back to your Character/Controller find the Event(s) that adds to your Movement (Not Rotation!) and create a Branch right after the Event(s). Drag in the bool you created in there and make sure only the False Output is Connected. If you use the default Third Person Character it should look like that:

Thats it but for safty make sure the bool gets unchecked “On End Overlap” it could be that you accidently get pushed away by Physics or something (you should remove your Widget there too to be safe)

Thanks. Why do you say is a stange set up?

You got many edge cases here. Overlap can be triggered by other Actors and will enable input :stuck_out_tongue_winking_eye:

What if you overlapping 2 of those Blueprints at once what will be displayed?

Its usually better to have a single Widget for example in your Controller and Hide/Unhide if needed as well as feeding it with Data. (unless you use Completly different Widgets for your interactables) will prevent Creating/Deleting/Garbage Collecting the Widget too.

Usually better to Handle all Input throug the Controller or Character but not Random Actors in the World. Input can be consumed before it reaches something else it can get confusing and hard to track very fast.

Other minor things.

I see. I have a lot to learn. can you recommend me a good tutorials, book or something to improve my performance in UE4?

Hmm things like that you usually learn best by practising and not from theory (at least in my Opinion) if you create the same Bug 2-3 times while Programming your mindset will change and you will always have it in your head before approaching to Code something.

And the thing with Tutorials is always dont take them step by step. Understand the reason why some things done in certain way (to avoid things I pointed out above)

And for Performance there is always a solid way to approach: Profile your Performance, Identify what is the Problem/Bottleneck, apply a apropriate fix. Repeat until you hit the Framerate you want.