Download

Why does an unpossessed Character stops movement?

I started from the Sidescroller template and I made this simple Blueprint to change possession between 2 Characters.

http://puu.sh/cCT6Y/c5bae64989.jpg

But if I jump with one Character then change possession to the other, then the first one gets stuck in the air instead of falling. Why is that? How can I fix it?

1 Like

I guess it still needs a controller feeding it input? Maybe add an AI controller and set that to the current “uncontrolled character”.

But still sounds wierd that falling stops, unless the controller manages the information for states and variables used by the character somehow.

1 Like

Yup, it’s weird. I was guessing the Character class just doesn’t process movement if it checks there are no controllers. But I’m not a scientist.

I’ll try adding the an AI controller as you suggest, thanks for the idea.

Just adding this for future reference in case anyone with the same problem finds this post. TheSpaceMan was right (thanks!). The Character was working in the beginning since it starts with the default AIController, but unpossessing it loses the AIController so it stops moving. All I did was reassign the AIController after the possession using the Spawn Default Controller node and now it’s working fine.

Here’s how it looks now: http://puu.sh/cLJy9/8e1ff51b04.jpg

Awesome, happy to help.

Better Solution

The problem with the last listed solution is that it will still slightly pause the movement. Say, if your character is falling and you do this; they’ll pause for a second in the air and then begin falling again. I’ve found an even more elegant solution to this problem. There’s a Boolean in the CharacterMovement component called ‘Run Physics No Controller’, by setting this to True it will solve the problem.

4 Likes

As far as I can see, you do the possession NOT in a “Level Blueprint”? May I ask you: why so? Because I have the same problem now: have two players that I need to possess between. When I possess from one character to another, the first one, which was unpossessed, stucks right in the animation pose. Attempt to turn on “Run Physics No Controller” gave me nothing, unfortunately.

Thankyou LordMorin, I tried a couple of manual workarounds with no luck till I found this

1 Like

Thank you LordMorin

Did you find a solution for this? I have the same issue.

Context: With Left-Click I toggle between two Characters and with a Right-click I order the selected one to go to a given location. I use “Simple Move to Location” (see photos attached)

Problem: If the first character is still moving when I swich to the second character, the first stops and the second goes to the destination of the first :frowning:

I have tried to use the “Possess” node to set back the default AIController to the character when deselected, but this does not change a thing.

Does someone have the slighliest idea of what may I be doing wrong?

Thanks a lot!

this is perfect!
You saved our assignment ^^

That fix the problem