
Adding lighting to the scene to give the perception of depth using shadows

Originally, I had planned to keep the cube shape for the player. However, because I couldn't really 'roll' a cube forward, it didn't give the motion I wanted. By switching to a spherical mesh, I could have the dynamic movement I was looking for.

To make it seem like the player was indeed rolling forward, I created another spherical object that acted as the ground. The ground sphere would roll 'backwards' relative to the player.

Laning logic for the player being applied to the arrow keys.

If a collision has occurred, stop the three.js clock, stop the ground sphere rotation, and stop the player rotation as well. Gravity is increased to make the ball 'melt' into the floor.

Going back to the vector basics from the first week of class!

Setting the ground rotation speed, as well as the player rotation speed. A bounce value is introduced to add some dynamic up and down motion to the player sphere.



