Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

First person player continues sliding to the left/right after collision and adding the widget to the viewport

I made a widget blueprint and an object blueprint with the box collision in the first person template. When the player approaches the object the widget is added to the viewport. The widget is set to the UI Only Mode. As i understand in this mode no any player movement is allowed and i can operate only in the widget. But when the player collides with the object and the widget is brought to the screen it continues sliding to the either side till the next obstacle. I tried to use the Stop Movement function but it didn’t help. How can I fix this?

Product Version: UE 4.21
more ▼

asked Dec 18 '18 at 03:24 PM in Blueprint Scripting

avatar image

6 1 2

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

I found the solution. I set Set Ignore Move Input to true and the player freezes without any sliding, i set it again to false when i exit from the widget. Thank you for your help.

more ▼

answered Dec 18 '18 at 05:48 PM

avatar image

6 1 2

(comments are locked)
10|2000 characters needed characters left

The input mode enables/disables input, not movement itself. So what happens in my opinion is that you press a movement key, the input axis goes from 0 to 1, but when the widget pops up the character movement stops getting input, so it doesn't register the key relesed event; for the character the key is still pressed, and Stop Movement won't help because the input axis value pertains.

You have to change axis inputs to 0 before showing the widget.

more ▼

answered Dec 18 '18 at 03:46 PM

avatar image

1.7k 11 7 8

avatar image Baktybek Dec 18 '18 at 04:20 PM

It is good assumption. I tried to set inputs to 0, the player still slides. What else makes the character continue moving?

avatar image Tuerer Dec 18 '18 at 04:29 PM

I just checked it in my project, and the axis value is indeed kept at 1 after Input is set to UI Only. What I did a long time ago is added a branch to player movement to avoid all those stuff, like this: alt text

So whenever you switch input to UI, you can set the variable to false. If it works in your case, you'll know for sure that the issue is in the input axis.

movement.png (183.0 kB)
avatar image Baktybek Dec 18 '18 at 05:05 PM

This variable is declared in the FirstPerson blueprint, is it correct? When i try to set it to false in my object blueprint I get error "Accessed None trying to read property".

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question