feat: implement plasma gun and rocket swarm mechanics along with various 3D asset imports

This commit is contained in:
DottsGit
2026-06-07 18:23:47 -04:00
parent c9f082ebba
commit 4bb867a6f2
50 changed files with 5372 additions and 437 deletions
+11 -41
View File
@@ -23,46 +23,16 @@ func _ready() -> void:
default_fov = camera.fov
func _build_model() -> void:
position = Vector3(0.3, -0.3, -0.7)
var body_mat = StandardMaterial3D.new()
body_mat.albedo_color = Color(0.15, 0.25, 0.15) # Olive drab
var black_mat = StandardMaterial3D.new()
black_mat.albedo_color = Color(0.05, 0.05, 0.05)
# Receiver
var receiver = MeshInstance3D.new()
var rec_mesh = BoxMesh.new()
rec_mesh.size = Vector3(0.05, 0.12, 0.4)
rec_mesh.material = body_mat
receiver.mesh = rec_mesh
receiver.position = Vector3(0, 0, 0.1)
model_root.add_child(receiver)
# Barrel
var barrel = MeshInstance3D.new()
var b_mesh = CylinderMesh.new()
b_mesh.top_radius = 0.01
b_mesh.bottom_radius = 0.01
b_mesh.height = 0.6
b_mesh.material = black_mat
barrel.mesh = b_mesh
barrel.rotation.x = deg_to_rad(90)
barrel.position = Vector3(0, 0.03, -0.3)
model_root.add_child(barrel)
# Scope
var scope = MeshInstance3D.new()
var scope_mesh = CylinderMesh.new()
scope_mesh.top_radius = 0.02
scope_mesh.bottom_radius = 0.02
scope_mesh.height = 0.2
scope_mesh.material = black_mat
scope.mesh = scope_mesh
scope.rotation.x = deg_to_rad(90)
scope.position = Vector3(0, 0.08, 0.05)
model_root.add_child(scope)
position = Vector3(0.3, -0.3, -0.49)
var model_scene = load("res://assets/weapons/dmr/source/M14 .blend")
if model_scene:
var model = model_scene.instantiate()
model_root.add_child(model)
model.scale = Vector3(0.1875, 0.1875, 0.1875)
model.rotation_degrees.y = 90
for light in model.find_children("*", "Light3D", true, false):
light.queue_free()
# Muzzle Flash
muzzle_flash = OmniLight3D.new()
muzzle_flash.light_color = Color(1.0, 0.8, 0.4)
@@ -125,4 +95,4 @@ func unequip() -> void:
var rig = camera.get_parent()
if rig and rig.has_method("set_weapon_fov"):
rig.set_weapon_fov(-1.0)
position = Vector3(0.3, -0.3, -0.7)
position = Vector3(0.3, -0.3, -0.49)