shoot action in demo

This commit is contained in:
h4570
2022-08-14 20:20:56 +02:00
parent 6e5b75e39b
commit 65f40091db
4 changed files with 38 additions and 21 deletions
+5
View File
@@ -33,6 +33,11 @@ void Player::update(const Heightmap& heightmap) {
PlayerShootAction Player::getShootAction() const {
PlayerShootAction action;
action.isShooting = weapon.isShooting;
if (action.isShooting) {
action.ray = Ray(camera.position, camera.lookAt);
}
return action;
}