Initial Setup for "Beyond the Clouds"


Initial Setup for “Beyond the Clouds”

The first step of setting up the “Level” scene was to implement an orthographic camera to create an isometric scene.

To make sure that the player’s movement is in line with the camera, the floor in the picture above is set at a -45 degree angle in the Y-rotation.

After the camera was set up, I moved on to player movement. The way I went about setting up the player movement was a simple script that took the player’s horizontal and vertical input, and directly modified the Rigidbodies velocity.

I had to use the “.normalized” to make sure that if the player held 2 directions at once, (ex. Up and Right) the player’s velocity wouldn’t exceed the set value. There was also an issue with the player’s Y-velocity increasing immensely whenever the value was changed, so I added the moveDirection vector3 to solve this issue.

When implementing the camera-follow-player mechanic, I didn’t want the camera to statically follow the player as I thought that wouldn’t look very great. I wanted to add a certain type of “lag” to the camera to give a more fluid feel to it. 

I used the Vector3.SmoothDamp method to create this lag effect that I was shooting for which turned out great.

Thank you for reading!