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?

2 Likes

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.

2 Likes

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.

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.

10 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

2 Likes

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

It works for me. You have to click the setting in each instance of the class with char movement

Thank you so much, Iā€™m so glad I found this sooner than later

In my opinion, running physics with no controller should be the default behavior - It just doesnā€™t make sense. (Not to mention all the MovementComponentā€™s states like velocity and the like are still intact, the values just donā€™t register.)