Player Input: Where Should the Logic Be Held?
Expanding on the Player Input
When creating our player character, we initially had the idea for all of the player interaction to take place within the third person view. This included the shooting, placing towers, and purchasing upgrades. However, as we discussed our idea more it became clear that a better view for building towers would be a top-down, wider angled, view.
The Problem
I set out to create player input controls to allow the player to seamlessly switch between a third person camera view and a top-down view. In this new "mode", the player got a much bigger picture of their surroundings. In addition, we made the cursor visible only while in this view to allow the player to easily interact with a familiar UI for placing buildings. However, there were a few problems.
The first problem was that controlling our character from a top-down view didn't feel good. It was clunky and there was no reason for the player character to be moving around while in this view either. This meant we would need a different set of movement controls while in the top-down view and some way to "reset" the camera back to the player character when the player wanted to swap between the two. Suddenly, I foresaw our player input logic becoming extremely messy very quickly.
The Solution
Two Input Modes: Two Pawns
Moving the Logic
![]() |
Player Controller logic handling swapping between both modes |
Comments
Post a Comment