Level pt 2


Was able to code the player movement. Basically uses physics only, except 2 ray casts (left and right of cube bottom down) to change the sprite's rotation.up to align with the surface normal under it. There is 2 settings, the first in the video makes it so when you leave a surface (jumping/falling) the rotation.up resets to straight up. The second part of the video the sprite rotation only happens when the character is grounded, so when they jump the rotation is reset to rotation.up. Not sure which i like better. I want to see resetting on jump to rotate the sprite to its normal straight up looks the best, but a bit on the fence about it. Next I will probably add in the actual sprite/animations for the player, then work on the enemy AI logic.

Leave a comment

Log in with itch.io to leave a comment.