How to create a trigger box that will enable the player to switch player characters upon button press when inside the box.

Hey! I’m fairly new to UE5, and am making a game where the player controls an RC drone via a control panel. Following a YT tutorial, I was able to create the control panel, the trigger volume within, and the drone itself, so when you hit F inside the trigger zone, you are switched to the POV of the drone.
However, I am having trouble with switching the playercontroller to actually move the drone. I am not familiar with Blueprints at all and have been unable to switch the input of the charactercontroller…
If images of the Blueprints are needed please let me know.

Hi @royalfreaky

In general switching control to another pawn is as simple as using the possess node. But you must ensure you have a player controller and input setup ready to handle the drone controls.

There is a something here need to be clear of

Are you a 1st/3rd person character that walks upto a console?

Once at the console do you jump to the RC camera or are you viewing it from say a screen?

If you jump to the RC and use its own camera in 3rd or 1st person then its a matter of possess the pawn and ensure the correct controls are mapped using the enhancedinput system.

If its a screen then you need to do some sort of proxy mapping that stops your player moving ubtil you exit the console, and redirect the inputs through to the drone. Sounds hard but ib reality its not. A simple boolean that registers you at the console that you check on you input actions

Let us know what your ideas are for this maybe we can help further

Hey! Thanks for the response.
It is a 1st person character that walks up to a console. Once at the console, and ‘F’ is pressed, you then possess the pawn and jump to the RC’s 1st person camera. I am just not sure how to switch the players input from the character to the pawn from inside the trigger zone.
I’m not sure how to map controls with the enhanced input system but I will look into it. In the meantime, would it be possible to give me advice on how to switch player input?

To switch pawns is a simple posess node and just feed in the RC as the target.

As you are possessing then the RC blueprint should contain the controls for its own movement. Just rememeber to have a control to exit and return back to your character

Right, thanks! I’ve set up a possess node in the event graph, and I am now able to switch characters and move around, but how do I isolate the ability to switch characters to only when they are inside the trigger zone?

So what you need is a vasic boolean, say bCanSwitch. When you overlap set it to true and end overlay set to false. Then when you press whichever key to switch then check that boolean with a simple branch

I attempted to find ‘CanSwitch’ but the node doesn’t show up even with ‘Context Sensitive’ turned off.

When you say ‘when you overlap set it to true’ does that mean dragging the output of Event ActorBeginOverlap out and selecting the CanSwitch boolean?

I’m sorry to keep asking for clarification, but would it be possible to give me a screenshot of what you mean? I think it would help.

Thats correct so beginoverlap set canswitch true, then endoverlap set canswitch false