Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends MeshInstance
- export (Material) var default_mat
- export (Material) var new_mat
- # Called when the node enters the scene tree for the first time.
- func _ready():
- pass # Replace with function body.
- func _process(_delta):
- if Input.is_action_just_pressed("mouse_left"):
- if get("material/0") == default_mat:
- set_surface_material(0, new_mat)
- elif get("material/0") == new_mat:
- set_surface_material(0, default_mat)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement