hurrmmm/godot/control_scheme/radial_ui.gd

13 lines
248 B
GDScript

extends Node3D
func _ready():
set_charge(0.0)
var charge_amount: float = 0.0
func set_charge(amount: float):
charge_amount = amount
var mat: ShaderMaterial = $MeshInstance3D.get_active_material(0)
mat.set_shader_parameter("charge", amount)