How to disable player movement after entering a collision area and re enable movement after exiting

First off Im using blueprints. Here is my question. How can I disable player movement upon entering a collision area and re enable it after exiting. Okay by default the player movement is only 2D/sidescroller. I set up a trigger(box collider) that switches the camera to an overhead view when the player enters. When player exits the camera goes back to the default 2D/sidescroller view. The issue I have is I cannot get the player movement controls to switch from 2D whenout of the trigger area to 3D when inside the trigger area. x axis to x and y axis.

I started with the TPS templae. Then I set up a variable boolean on trigger area blueprint for player in and out of trigger area.(on overlap set bool to true— on end overlap set bool to false). This lets me know if the player is in a 2D area or a TPS area.

And thats as far as i’ve gotten with things functioning. Enable disable didn’t work for me. Ignore movement input. I think this might be it but I don’t understand it. Lastly im not sure if(and how) I need to do this in the box collision blueprint or the player character blueprint

I would handle this in the player character. Setup a bool variable to know if the player is in 2D or TPS, like you did and change that variable on begin/end overlap. Then you’ll have to setup the 2D movement, if not already done. There are usually input nodes like “MoveForward” or “MoveRight” that handles the character movement. Just put a branch after these nodes and hook up the bool variable. Here is an example from the first person template. You can copy yours from the sidescroller template or make a new one.

Hope this helps. Good luck and have fun

Thank you much. I had to play around with it for a day. Initially it did not work. The problem was getting my TPS Bools set correctly true or false. Oh and having to set a bool on begin play with in the character blue print. My character movement would start in 2d and when it crossed into the TPS area it stayed in 2d. It didnt change until the character crossed back into the 2D area. Which now made the movement TPS in the 2D area and vice versa. Setting the bool false on begin play fixed this. I would show the end result if I could but im not able to due to enternet connection.

I Really do thank you for your help.

No problem, you’re welcome :wink: