LaserGun without collisions

This commit is contained in:
Morph01
2024-08-14 18:46:31 +02:00
parent ef0bcd0a35
commit b92c5169c4
12 changed files with 161 additions and 6 deletions

22
src/Bullet.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include "Bullet.h"
using namespace godot;
namespace blitz {
static constexpr float BULLET_SPEED = 40.0f;
void Bullet::_bind_methods() {}
Bullet::Bullet() {}
Bullet::~Bullet() {}
void Bullet::_ready() {}
void Bullet::_physics_process(float a_Delta) {
Vector3 movement = Vector3(0, 0, -BULLET_SPEED) * a_Delta;
set_position(get_transform().xform(movement));
}
} // namespace blitz