15 lines
487 B
GDScript
15 lines
487 B
GDScript
extends TextureRect
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
texture = Global.EgoVehicle3D.MainSubGetTexture()
|
|
pass # Replace with function body.
|
|
|
|
func _physics_process(delta: float) -> void:
|
|
Global.EgoVehicle3D.main_sub_viewport.size = size
|
|
var minSize = Vector2(1,size.y/size.x)
|
|
material.set_shader_parameter("size",minSize)
|
|
var Magnification = minSize.y / minSize.x
|
|
material.set_shader_parameter("round_all",0.05*Magnification)
|