Player controls, movement and interactions
Player controls
We set up player movement with the unity input manager as a base, this can allow us to easily implement controls that are usable across different control schemes, such as keyboard and mouse or game-pad. While our primary release target is OpenGL on PC, controls were done in this way to make an easy alternative option for players that may wish to use a game-pad as their control scheme of choice. The controls as this point in time are:
- Movement - WASD / Left Joy-Stick
- Camera - Mouse / Right Joy-Stick
- Sprint - Left Shift / Left Trigger Button
- Jump - Spacebar / South Game-pad Button
- Punch - Left Click / West Game-pad Button
- Grab - Right Click / East Game-pad Button
Camera controls
The camera controls used is a third person control with mouse look. This allows the camera to move not only with the user's movement inputs but also with their mouse, allowing them to see all around rather than just what the player is facing. This is important since some of the levels will require the player to take note of their surroundings in order to complete the puzzles. The camera used is a Cinemachine camera targeting the player object in unity with the 3rd person follow settings.
Movement
Movement has been adapted from the Unity Starter Assets for PlayerMovement, with the primary change being that movement is applied to the player characters rigidbody, allowing for movement to be tied to a physics system that is essential for the gameplay being tied to a boulder that is attached to the player with a chain and capable of pulling the player around with its weight. The chain too acts as an anchor to stop the player from moving too far away from the boulder easily.
Punching and Lifting mechanics were made by extending the use of the unity input manager, adding in new commands for the left and right click on the mouse, keeping all mechanics using the same underlying system. The way in which they work is very similar, with each creating a cube to shoot out in front of the player a small distance. This cube is the hitbox for the abilities, and is sent out to check for any applicable objects that can be interacted with (in this case the boulder, however the types of objects can be increased in the future).
Note that in game the cubes are non-visible as from the players point of view the character animations will display that they are performing these actions. The main difference between the punch and the lift is that while the punch cube has a physical presence, allowing it to push objects it comes in contact with, the lift has no such presence, instead tagging the object that it passes through as an object to be lifted up by the player, sending a command to the player to pick up the tagged object (usually the boulder), and changing the right click functionality to instead be placing the held object back on the ground, as seen below.
Ignore the placeholder model :)
Doomed to Flail
Will you escape this purgatory, or will you be doomed to flail?
Status | In development |
Authors | Raizenz, eve, perfectcatto |
Genre | Adventure |
Tags | greek, Singleplayer, Third Person |
More posts
- Bug fixing + QoL changesOct 14, 2022
- Tutorial levelOct 13, 2022
- Building for WebGLOct 11, 2022
- Testing and FeedbackOct 06, 2022
- Testing Feedback (Form Link)Oct 04, 2022
- Player Upgrades and Puzzle IslandsSep 29, 2022
- Setting up Gameloop and Advanced MechanicsSep 21, 2022
- Game models and animationsSep 14, 2022
- Game Concepts and DesignSep 12, 2022
Comments
Log in with itch.io to leave a comment.
Good! Phisics is a special theme. It is hard to set it right! Looks your phisics works well!