feat: implement plasma gun and rocket swarm mechanics along with various 3D asset imports
This commit is contained in:
+10
-28
@@ -17,34 +17,16 @@ func _init() -> void:
|
||||
projectile_gravity = 0.0 # Flies straight
|
||||
|
||||
func _build_model() -> void:
|
||||
position = Vector3(0.4, -0.4, -0.6)
|
||||
|
||||
var mat_grey = StandardMaterial3D.new()
|
||||
mat_grey.albedo_color = Color(0.3, 0.3, 0.3)
|
||||
|
||||
# Main Tube
|
||||
var body = MeshInstance3D.new()
|
||||
var b_mesh = CylinderMesh.new()
|
||||
b_mesh.top_radius = 0.08
|
||||
b_mesh.bottom_radius = 0.08
|
||||
b_mesh.height = 0.8
|
||||
b_mesh.material = mat_grey
|
||||
body.mesh = b_mesh
|
||||
body.rotation.x = deg_to_rad(90)
|
||||
model_root.add_child(body)
|
||||
|
||||
# Back cone
|
||||
var cone = MeshInstance3D.new()
|
||||
var c_mesh = CylinderMesh.new()
|
||||
c_mesh.top_radius = 0.08
|
||||
c_mesh.bottom_radius = 0.04
|
||||
c_mesh.height = 0.2
|
||||
c_mesh.material = mat_grey
|
||||
cone.mesh = c_mesh
|
||||
cone.rotation.x = deg_to_rad(90)
|
||||
cone.position = Vector3(0, 0, 0.5)
|
||||
model_root.add_child(cone)
|
||||
|
||||
position = Vector3(0.4, -0.4, -0.945)
|
||||
|
||||
var model_scene = load("res://assets/weapons/rocket launcher/source/Law72.fbx")
|
||||
if model_scene:
|
||||
var model = model_scene.instantiate()
|
||||
model_root.add_child(model)
|
||||
model.scale = Vector3(0.25, 0.25, 0.25)
|
||||
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.6, 0.2)
|
||||
|
||||
Reference in New Issue
Block a user