Getting celestial positions via script
This commit is contained in:
parent
716e932eb2
commit
23aa03efd9
2 changed files with 30 additions and 6 deletions
24
maps/basic_setup.gd
Normal file
24
maps/basic_setup.gd
Normal file
|
@ -0,0 +1,24 @@
|
|||
extends Node3D
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
var celestial_positions = get_celestial_position()
|
||||
print(celestial_positions)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
func get_celestial_position():
|
||||
var stigi_pos = get_node("WorldEnvironment").environment.sky.sky_material.get_shader_param("stigi_position")
|
||||
var stigi_arc = get_node("WorldEnvironment").environment.sky.sky_material.get_shader_param("stigi_arc")
|
||||
|
||||
var samayun_pos = get_node("WorldEnvironment").environment.sky.sky_material.get_shader_param("samayun_position")
|
||||
var samayun_arc = get_node("WorldEnvironment").environment.sky.sky_material.get_shader_param("samayun_arc")
|
||||
|
||||
var zabr_pos = get_node("WorldEnvironment").environment.sky.sky_material.get_shader_param("zabr_position")
|
||||
var zabr_arc = get_node("WorldEnvironment").environment.sky.sky_material.get_shader_param("zabr_arc")
|
||||
|
||||
var positions = {"stigi_pos":stigi_pos, "stigi_arc":stigi_arc, "samayun_pos":samayun_pos, "samayun_arc":samayun_arc, "zabr_pos":zabr_pos, "zabr_arc":zabr_arc}
|
||||
|
||||
return positions
|
|
@ -1,16 +1,16 @@
|
|||
extends Control
|
||||
# Panel to include all developpment tools for testing / debugging etc.
|
||||
|
||||
extends Control
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
pass
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
# Signals calls
|
||||
# Quit button
|
||||
func _on_quit_pressed():
|
||||
var parentname = get_parent().name
|
||||
print(parentname)
|
||||
get_parent().get_node("developper_panel").queue_free()
|
||||
queue_free()
|
||||
|
|
Loading…
Reference in a new issue