Setting up movement script
Over the last week I have spent a majority of my time coding the movement for the game.
It initially begun with me settings up the players rotation and camera to work together so the players rotation moves separately from the camera which didn't cause too many problems and was completed pretty quickly.
The same goes for directional movement and jumping which didn't prove to hard either and was completed pretty quickly.
The problems began when I decided to add a coyote timer so the player could jump briefly after leaving a platform, after figuring out how to do it I ran into the problem that the jump was incredibly weak compared to a regular jump. I fixed this by resetting the y velocity on jumps so they are all equally powerful.
The last bit of movement I needed to code was diving which took the longest of all the movement to code. I ran into the problem that I couldn't get the direction the dive would go in to be the direction the player is facing and would either make it where the camera is facing or a set axis.
I fixed this by referencing my regular movement code in the end which fixed those problems.
lastly I wanted to add a slow after the dive ends for a brief moment which worked as intended until on a platform it randomly didn't work. This was because the slow was caused by a downwards force imposed on the player but I had placed a low friction material on the platforms so the player wouldn't slow down. I then fixed this by imposing a move speed multiplier slow instead of a downwards force which worked in the end.
Get Chained Door
Chained Door
Third person 3d platformer featuring a mysteriously locked door the player must attempt to unlock
Status | In development |
Author | NightlyClover2 |
Genre | Platformer |
More posts
- Finishing upJan 16, 2024
- Scene changesDec 12, 2023
- Creating level 1 and fixing movement scriptDec 05, 2023
- Initial set upNov 14, 2023
Leave a comment
Log in with itch.io to leave a comment.