demo update

This commit is contained in:
h4570
2022-08-20 00:10:07 +02:00
parent 8eb01d34da
commit 405d5afd35
21 changed files with 306 additions and 122 deletions
+3 -2
View File
@@ -18,7 +18,7 @@ Player::Player(Engine* engine)
pad = &engine->pad;
position = Vec4(3.0F, 50.0F, 0.0F);
camera.lookAt = Vec4(0.0F, 0.0F, -30.0F);
speed = 5.0F;
speed = 6.0F;
}
Player::~Player() { delete pair; }
@@ -36,7 +36,8 @@ PlayerShootAction Player::getShootAction() const {
action.isShooting = weapon.isShooting;
if (action.isShooting) {
action.ray = Ray(camera.position, camera.lookAt.getNormalized());
action.ray =
Ray(camera.position, (camera.lookAt - camera.position).getNormalized());
}
return action;