feat: implement plasma gun and rocket swarm mechanics along with various 3D asset imports
This commit is contained in:
+16
-16
@@ -17,22 +17,22 @@ func _init() -> void:
|
||||
projectile_gravity = 15.0 # Heavy drop
|
||||
|
||||
func _build_model() -> void:
|
||||
position = Vector3(0.3, -0.4, -0.5)
|
||||
|
||||
var mat_olive = StandardMaterial3D.new()
|
||||
mat_olive.albedo_color = Color(0.2, 0.3, 0.1)
|
||||
|
||||
# Thick short tube
|
||||
var body = MeshInstance3D.new()
|
||||
var b_mesh = CylinderMesh.new()
|
||||
b_mesh.top_radius = 0.12
|
||||
b_mesh.bottom_radius = 0.12
|
||||
b_mesh.height = 0.5
|
||||
b_mesh.material = mat_olive
|
||||
body.mesh = b_mesh
|
||||
body.rotation.x = deg_to_rad(90)
|
||||
model_root.add_child(body)
|
||||
|
||||
position = Vector3(0.5, -0.4, -0.8)
|
||||
|
||||
var model_scene = load("res://assets/weapons/mortar/source/scene.gltf")
|
||||
if model_scene:
|
||||
var model = model_scene.instantiate()
|
||||
model_root.add_child(model)
|
||||
model.scale = Vector3(0.0025, 0.0025, 0.0025)
|
||||
model.rotation_degrees.y = -90
|
||||
model.position.y -= 0.2
|
||||
|
||||
# Aggressively strip any rogue nodes from the GLTF that could ruin the scene
|
||||
for node in model.find_children("*", "", true, false):
|
||||
if node is Light3D or node is Camera3D or node is WorldEnvironment or node is ReflectionProbe:
|
||||
if node is Node3D: node.visible = false
|
||||
node.queue_free()
|
||||
|
||||
# Audio
|
||||
fire_sound = AudioStreamPlayer3D.new()
|
||||
fire_sound.bus = "SFX"
|
||||
|
||||
Reference in New Issue
Block a user