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"

Disable player movement but allow camera control


is it possible to disable the character movement but allow the player to control the camera in Blueprint? I want to freeze the character in place until the player looks at a certain area, then unfreeze the movement.

Thanks in advance, Florian

Product Version: Not Selected
more ▼

asked Jul 17 '14 at 08:50 AM in Blueprint Scripting

avatar image

35 8 8 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You can. Create a boolean variable named 'Movement Locked'. Set it to true when you want to lock the controls. Within the event handlers for charcter movement (Move forward, Move right....), use a Branch node to test for this boolean variable and apply movement inputs only if it is FALSE.

When you want to let the charcter move, set this variable to False.

more ▼

answered Jul 17 '14 at 09:15 AM

avatar image

3.4k 154 52 271

avatar image FlowDE Jul 17 '14 at 10:03 AM

Thanks, but I am working with a C++ Third person project, so there are no BP Events for movement. Is there a way to do this with Blueprints in my case?

avatar image mindfane Jul 17 '14 at 10:37 AM

Events for movements = The Axis and Action bindings for your charcter.

Look below and see the answer from @rjvm . That is what I meant.

You should follow that blueprint and it will work. One thing you might want to change is when you change 'Can Move' to TRUE or FALSE. In your case it must be based on charcter rotation

avatar image FlowDE Jul 17 '14 at 10:56 AM

I know what you meant but I don't have those events implemented already, since my Project is based off of C++ Third Person. My Character Blueprint looks like this: alt text

The events in there are the ones I wrote for my purposes, otherwise it is empty. When I try to implement the method below by adding the axis events, I just can't move at all. I'm guessing the Blueprint and the C++ code conflict with each other and an error occurs.

Thanks for your efforts, but I'll solve it using code.

characterbp.jpg (113.1 kB)
avatar image mindfane Jul 17 '14 at 11:06 AM

Couldn't you do the same logic in your C++ code? I mean you already have functions bound to events. Just add this additional logic in there. Its only a single If-else statement.

avatar image FlowDE Jul 17 '14 at 11:50 AM

Yea it'll be the same logic :)

avatar image FlowDE Jul 17 '14 at 10:58 AM

This method definitely works if you're using the BP template, for anyone else looking for something like this!

avatar image Nick Jackson Oct 09 '16 at 04:01 AM

Up voting this. Came across the same problem, and the same solution before I stumbled on this thread. This is probably the best way to do it. Tried using Disable Character Movement but it was producing odd results when Character was placed on other moving objects (e.g. platform or a moving ship)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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