Possessing a vehicule from a thirdperson character

Hi everyone and thanks for your help !
I’ve got a default third character and I placed a vehicle in my scene. When I try to possess the vehicle, it works good, but the control of the vehicle doesnt work.

I tried casting to the vehicle and setting the vehicle controller to the target of “Possess”, but in this case nothing happens when I press C. I still control the 3rd person.

Can you explain me how to do this ?

First way is correct but the problem probably doesn’t come from possession but rather from how input is setup in project and how the vehicle expects it to work. There are several ways to implement input and if you didn’t make the vehicle yourself you’ll either need some documentation or dig through its code/blueprints to figure out what it needs.

Thanks for your reply. The inputs to control the vehicle work well. Here’s more details about the project : I created a project based on the third person template. Then, I added in the project the default Unreal vehicle asset. When I choose the gamemode of the vehicle for the level, I start the game with the vehicle and I can control the vehicle with no problem. And then I possess the character and it doesn’t move. And when I switch back with to the vehicle I can control it. And vice versa : when I start the game with the gamemode of the character, I can control it. When I possess the vehicle I can’t move the vehicle. It’s like the gamemode define what pawn I can during all the game, even if I possess another pawn.

Hm this is odd I can’t reproduce your issue.

I tried to do something similar as you described, ie. imported Vehicle and VehicleBP folders from Vehicle template into ThirdPerson template, and placed a vehicle in the scene.

I have no issue switching between the two with Possess, using either game mode.

1 Like

Very strange. I created another project from zero, based on the third person template. Just imported the vehicle asset and configuring the possess function again. Seems like we do the same thing. But the issue is still here for me. I’ll post a short video, maybe you’ll see what I’m doing wrong :thinking:

Hi @GinDevt, Welcome to the Forums.

There’s a new Input system that might be complicating things a bit.

Also, try using the node ‘Get Player Controller’ to feed into the “Target” on both ‘Possess’ nodes.

Here’s a screenshot of how I got it to work previously:

1 Like

Perfect !! Thank you so much for your answer ! :smiley::smiley::smiley:

@Chatouille Thank you very much for your help and your patience :wink: The problem seems coming to the new input system of Unreal. Problem solved with the solution of @Astrotronic

[quote=“GinDevt, post:8, topic:751192”]
patience :wink: The problem seems coming to the new input system of Unreal. Problem solved
[/quote] Hey Astrotronic - Im having simialr issues but the mapping solution doesnt seem to be working. Any other suggestions?

Hi Trace,

It could be several things, Inputs getting consumed by something else, a bad cast node, conflicting setup with the new ‘enhanced input’ system.

My suggestion is to watch some community tutorials, and either you’ll come out of those with a working system, or gain enough knowledge to troubleshoot your existing system.

Important things to know is that there are now ‘Chaos Vehicles’ (enabled via plugin) and it is possible to use the older input system, but newer templates (Like default third person) are using the new system.