Posted August 24, 2024 by The Everdream
☆⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂ ⠂⠄⠄⠂☆
During the early stages of Everdream's development, the team decided we wanted a player controller that was comfortable to use with snappy inputs that also made the player feel like the character was in a dream-like state. This meant finding a way to create a controller that felt slow and floaty like a dream but also still had snappiness and quick action to the inputs from the player.
After deciding on the movement, I added stats like Coyote jumps, edge float detects, and queued jumps to the scriptable stats to add that bit of extra versatility to the jump system on the player controller. The player jump was also tied to velocity by frame movement on the Y axis to keep the movement system the same as the horizontal movement.
Once all the basics of the player controller were set up, it was time to add interaction scripts so that our players could interact with the world around them. For the interaction system, I started by putting together a list of the different types of interactions the player could have. Pick up items, grabbing and dropping objects, and examining objects were the first basic ones I started with.
In the interaction script, I created a DetectObject method that would detect anything marked with the interactable tag when it came within a range of the player's detection radius. A Separate item script that was attached to the object would then list the interactable object and the type of interaction it could have. Once the object type was decided, a separate script would be used to call the methods for each interaction type.