W09 – Navigation with Camera and Controls

The assignment allows me to use my midterm project, so I will do that instead of starting a new project, which is nice because just a couple days ago I was still thinking on how to improve this project and had some idea.

First start, nothing special, 

I added a line of code for GUI to see the effect of controlling the Z value of the camera, and that was, okay, but it is overly simple too.

adding the damping value to have the camera move smoothly, the difference is pretty huge compared to before and afters.

Then I tried the camera auto moving for x and z, turns out that moving on Z value looks nicer to me.

After that, I decided to try out the method of using keys to control camera views, turns out okay, just the tiny flaw on misunderstanding the codes,

I was confused on why all the other keys all work well but only the down arrow key is not working, turns out, I should use BOTTOM instead.

Also, there is a strange problem that comes out of nowhere. By adding this control method, the canvas suddenly moves down to the bottom of the screen and had an awkward blank black screen left on the top, I had to scroll down to see my scene everytime.

As you can see, this is an awkward state, so I had to find out how to solve this, and luckly it is not hard

Additionally, after playing around on the new project for a bit, I noticed that after several attemps of trying out the arrow keys, the camera position will just be in a weird place and it is hard to let it return to the original origin, so I added some line of code to have a key incharge of doing that, reseting the camera position.

Noticing that there is abosolutely nothing in my GUI for my project from the start until this point, I figure it would be nice to have a button in the gui to be pressed and does the samething swould at least make the GUI function useful in my project.


Then this happened, for some reason, the strange overlay problem happened and let the reset button be blocked by the GUI’s UI, and I was confused on why this happened, after attempting to move the GUI position around I noticed that this is not a positioning issue.

In the end the problem was solved by change the position to abosolute.

Leave a comment

Your email address will not be published. Required fields are marked *