Added water mesh, jumping animation, skybox and diving.

This commit is contained in:
Foxar
2020-12-03 18:33:20 +01:00
parent 940271fe8c
commit bae834e599
7 changed files with 73 additions and 158 deletions
+3 -1
View File
@@ -14,7 +14,6 @@
const float CAMERA_Y = 15.0F;
Camera::Camera(ScreenSettings *t_screen) : CameraBase(t_screen, &position, &up)
{
verticalLevel = 80.0F;
@@ -35,14 +34,17 @@ void Camera::update(Pad &t_pad, Mesh &t_mesh)
void Camera::rotate(Pad &t_pad)
{
if (t_pad.rJoyH <= 50)
horizontalLevel -= 0.08;
else if (t_pad.rJoyH >= 200)
horizontalLevel += 0.04;
/*
if (t_pad.rJoyV <= 50 && verticalLevel > 25.0F)
verticalLevel -= 0.9F;
else if (t_pad.rJoyV >= 200 && verticalLevel < 80.0F)
verticalLevel += 0.9F;
*/
unitCirclePosition.x = (Math::sin(horizontalLevel) * verticalLevel);
unitCirclePosition.y = CAMERA_Y;
unitCirclePosition.z = (Math::cos(horizontalLevel) * verticalLevel);