

What we have in our project
Added reset button

| var mat = ResourceLoader.load("res://Material/Planet.tres"); | |
| var mat2 = ResourceLoader.load("res://Material/Planet2.tres"); | |
| var new_texture = ImageTexture.new(); | |
| var new_texture2 = ImageTexture.new(); | |
| for child in range($Sun.get_child_count()): | |
| if ($Sun.get_child(0).get_index() == child): | |
| continue | |
| elif ($Sun.get_child(1).get_index() == child): | |
| new_texture.load("res://Texture/Planet/Mercury.jpg") | |
| mat.albedo_texture = new_texture | |
| mat.emission_texture = new_texture | |
| new_texture.get_format() | |
| elif ($Sun.get_child(2).get_index() == child): | |
| new_texture2.load("res://Texture/Planet/Venus.jpg") | |
| mat2.albedo_texture = new_texture2 | |
| mat2.emission_texture = new_texture2 |
| extends Spatial | |
| func _ready(): | |
| pass | |
| func _input(event): | |
| if Input.is_key_pressed(KEY_SPACE): | |
| if $Base/InnerGimbal/Camera.make_current(): | |
| $Base/InnerGimbal/Camera.clear_current(true) | |
| if Input.is_key_pressed(KEY_1): | |
| if $Sun/Planet/Base/InnerGimbal/Camera.make_current(): | |
| $Sun/Planet/Base/InnerGimbal/Camera.clear_current(true) |











