Vehicle & 3rd Person Not Moving when Possessed in UE 5.1

I am having issue in UE 5.1 When I have both 3rd person character and vehicle (the template-based ones) loaded into same level and want to use a keyboard shortcut to possess/switch between them.

I can only control the auto possessed pawn upon game start but when I try to possess the other one through controller blueprints It doesn’t respond to keyboard inputs and doesn’t move.

So if for example I start playing with the 3rd person character auto possessed and press the keyboard shortcut that I designated to possess the vehicle instead, it gets possessed but it doesn’t move. Switching back to the character will make it move without issues.

I have set gamemode in world setting to most option combinations but to no veil. I have tried vehicle and character controllers as default and also tried “none”. What happens is the game mode I select as default is the one the ends up working.

P.s it works correctly as intended in UE5 but not 5.1 for some reason, I don’t know what changes they did to 5.1 as opposed to 5.

I have read about “Consume Input” but couldn’t find where to do it for enhanced input and only found it for the custom key press nodes I created myself.

I also read somewhere that rigid bodies can sleep if not used for a while and tried to wake em all up but it didn’t work.

Its very confusing it should be straight forward, Anyone experienced such an issue?

Any tips or recommendations?

Hi Serenity,

My guess is that it involves the new Enhanced Input system. (Now enabled by default in 5.1)

The first thing I’d try is adding/removing the mapping contexts when possessing.

Let me know how that works out. I’ve seen quite a few questions about combing vehicles with the other templates, It might be a good candidate for a tutorial.

Thanks for the reply.

How do you add/remove the mapping contexts when possessing?
So I can try it and revert back

Hey there @serenity_81! You can either call it from the possessed and unpossessed events or if you need to do it before/after that you can call it whenever you need. Here’s an example!

1 Like

I tried putting the nodes you suggested in both the vehicle and 3rd person controllers (selecting the relevant Mapping Context) but it didn’t do anything.
Any suggestions?

My suggestion is to use ‘Print String’ node after input events to double check inputs/functions/events.

I just set this up in the Third Person Map. I used the Level Blueprint (In UE5 you can open level BP by clicking on the “Blueprint Nodes” button to the left of the “Clapper” icon.) To easily reference the VehiclePawn and Character.

One tricky part is selecting the right “IMC_Default” - just hover over the selections and select the one with the correct path.

Cheers to SupportiveEntity for reminding me about the ‘Event Possessed’ nodes.

1 Like

Thanks, its working now but I noticed that I place a 'print string" node after all the event possess and unpossess to see which are fired, it shows that both the vehicle and character are being possessed at game start/play even though only the character model in Outliner->detailer have auto possess to player 0 and vehicle is set to disabled. But if I set the vehicle to another player number from 1-7 it will work and not get the print string to shows that both are being possessed initially. I have game mode set to “none” in word setting btw.

After a few tweakings with mapping context selection it finally worked.
but there is some weird issue please check my reply to member “Astrotronic”:

Thanks a bunch

I get an accessed none trying to read property callfunc_getlocalplayersubsysemfromplayercontroller error

I didnt get that try to start with a new project and see if you still get the issue

If you’re upgrading a project from a previous version, it may not be set up to use enhanced input.

Go to Project Settings → Input and set the ‘Default Classes’ to the EnhancedInput flavor.

Thanks a lot for your explanation. Made my day :wink: I’m able now to move the car but I don’t know how to add the node BP_ThirdPersonCharacter from Persistence level in the level blueprint so I’m not able to go back to ThirdPersonCharacter. Can you please give me a hint?

Hi @BroMaTe0, Glad to hear it! I’m just getting back into the office today.

You could drag the Character from the ‘Outliner’ panel into the Level Blueprint.

But ultimately you’ll want to be able to do this logic anywhere, which can be accomplished with 2 simple nodes:

Here is the solution if anyone else is facing same problem:
How to Enter and Exit a Vehicle in Unreal Engine 5 - Car Interaction - YouTube

So I have everything setup and working, according to the video, and these new controls to make the car move, but when I hit E to get out of the car, the car just teleports a little to the left. if I spam the e button, it will jump across the map in small increments. Why does my character not get out of the car and give me control back of the character?

So, as I understood, we need to remove this keys mapping. I have an example for multiplayer. When we spawn the player after exiting the car, before possessing the controller, we need to remove the car mapping and set the player mapping.

I just called it on the controller for the client.