9 lines
191 B
GDScript3
9 lines
191 B
GDScript3
|
extends Node3D
|
||
|
|
||
|
func _ready():
|
||
|
set_charge(0.0)
|
||
|
|
||
|
func set_charge(amount: float):
|
||
|
var mat: ShaderMaterial = $MeshInstance3D.get_active_material(0)
|
||
|
mat.set_shader_parameter("charge", amount)
|