aboutsummaryrefslogtreecommitdiff
path: root/game/enemy/EnemyBulletScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/enemy/EnemyBulletScript.cpp')
-rw-r--r--game/enemy/EnemyBulletScript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/game/enemy/EnemyBulletScript.cpp b/game/enemy/EnemyBulletScript.cpp
index 65c0c23..d208a88 100644
--- a/game/enemy/EnemyBulletScript.cpp
+++ b/game/enemy/EnemyBulletScript.cpp
@@ -18,7 +18,7 @@ void EnemyBulletScript::fixed_update(crepe::duration_t dt) {
Transform & cam_transform = this->get_components_by_name<Transform>("camera").front();
Rigidbody & bullet_body = this->get_component<Rigidbody>();
//move
- transform.position.x += bullet_body.data.linear_velocity.x * dt.count();
+ transform.position += bullet_body.data.linear_velocity * dt.count();
vec2 half_screen = camera.viewport_size / 2;
float despawn_location = cam_transform.position.x - half_screen.x - 50;
if (transform.position.x < despawn_location) {