diff --git a/COGITO/Wieldables/toy_pistol.tscn b/COGITO/Wieldables/toy_pistol.tscn index c938e157..b3963ad2 100644 --- a/COGITO/Wieldables/toy_pistol.tscn +++ b/COGITO/Wieldables/toy_pistol.tscn @@ -77,7 +77,7 @@ bus = &"SFX" [node name="Bullet_Point" type="Node3D" parent="."] unique_name_in_owner = true -transform = Transform3D(1, 0, -1.81899e-12, 0, 1, 0, 0, 0, 1, 0.277335, 0.0601448, 0.00182778) +transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.277335, 0.0601448, 0.00182778) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { diff --git a/COGITO/Wieldables/wieldable_toy_pistol.gd b/COGITO/Wieldables/wieldable_toy_pistol.gd index c995b306..45cee76e 100644 --- a/COGITO/Wieldables/wieldable_toy_pistol.gd +++ b/COGITO/Wieldables/wieldable_toy_pistol.gd @@ -57,6 +57,8 @@ func action_primary(_passed_item_reference : InventoryItemPD, _is_released: bool # Spawning projectile var Projectile = get_projectile() bullet_point.add_child(Projectile) + Projectile.set_global_position(Vector3(bullet_point.global_position.x,bullet_point.global_position.y,bullet_point.global_position.z)) + Projectile.global_transform.basis = bullet_point.global_transform.basis Projectile.damage_amount = _passed_item_reference.wieldable_damage Projectile.set_linear_velocity(Direction * projectile_velocity) Projectile.reparent(get_tree().get_current_scene())