grunk/src/equipment/spring_cast.gd
Rob Kelly f97a2da5c2
Some checks failed
linting & formatting / build (push) Failing after 4s
Better particle beam effects
2025-03-06 15:37:54 -07:00

14 lines
374 B
GDScript

class_name SpringCast extends RayCast3D
## Raycast which places its children at the collision point (if any)
@export var normal_offset := 0.0
func _process(_delta: float) -> void:
if is_colliding():
for child: Node3D in get_children():
child.global_position = get_collision_point() + get_collision_normal() * normal_offset
visible = true
else:
visible = false