Posts

Showing posts with the label day4

Day 4 - Reflection

Targets I added an extra target, because I had to fix my freezeMovement. Afterwards I completed the player/camera rotation based on mouse input. I started on the challenge design and came up with an approach on the challenge system.  Reflection Today I had a great start, I quickly fixed my code and scraped the unnecessary code repetition. Also changing my rotation script was done pretty easily. Next was the vertical rotation, this was something I had done in a previous project. For the up and down range for the vertical rotation I used Mathf.Clamp, this was something I had to look up in my old code in order to integrate it into my script.  After finishing the character movement and rotation I moved on to the challenge system. I found that my concept was still really vague, which made it hard for me to decide on my approach. So I thought of looking at the problem step by step. First I decided that I wanted to keep it in the same scene. Then I decided I wanted to cre...

Day 4 - Progress

Image
Before I started working on my first target I noticed something in my code I didn't like, regarding the freezeMovement boolean. This needed to be fixed first! Fix freezeMovement Whenever the Update function of the CharacterMovement script checked for player input and the outcome was less than or greater than zero a function was called. In this function a check was performed, whether freezeMovement was false, if so the movement script started. But I did this separate for each movement function (see image below) and now I was going to add two more for the rotation.  This unnecessary (and ugly) code repetition had to go! So I moved the boolean check for freezeMovment to the Update, so now the first thing that get's checked is if the character's movement is frozen, if not the code checks if there's player input and then the function gets called. This way the system only needs to check the freezeMovement once (see image below). ...

Day 4 - Targets

Yay, day four! Or should I say, the first day of my sprint. I have a lot of work in store and also some catching up to do :) Targets character rotation based on mouse input set up challenge system start challenge design I think I have a full day of work ahead of me, the most important target is working on the challenge system.