add random start for train o start from a stop

This commit is contained in:
2026-04-24 17:08:24 +02:00
parent 8f02afa796
commit 72c933ba73
5 changed files with 111 additions and 1 deletions

View File

@@ -133,6 +133,11 @@ extends Resource
@export var godray_spawn_height: float = 5.0 #Y world position where god rays spawn
@export var godray_scale: Vector3 = Vector3(2.0, 6.0, 2.0) #Scale of the god ray mesh
#Train start settings
@export_group("Train Start")
@export var train_start_from_random_position: bool = false #When enabled the train starts from a random offset on the rail curve instead of a stop
@export_range(0, 64, 1, "or_greater") var train_start_stop_index: int = 1 #Stop index used for the train start when random start is disabled
#Snow settings
@export_group("Snow")
@export var snow_amount: float = 0.0 #Initial snow coverage amount (0.0 = none, 1.0 = full)
@@ -141,6 +146,7 @@ extends Resource
@export var snow_threshold: float = 0.4 #Normal Y threshold for snow accumulation on surfaces
@export var snow_accumulation_speed: float = 0.014 #Accumulation speed: 0.1 -> 10s, 0.05 -> 20s, 0.02 -> 50s, 0.012 -> ~83s
@export var snow_melt_speed: float = 0.05 #Speed at which accumulated snow melts away
@export var show_snow_accumulation_volume: bool = true #Enables vertex snow buildup; when false snow only changes surface color
@export var snow_max_accumulation: float = 0.25 #Maximum accumulated snow factor applied to coverage and thickness
@export var snow_color: Color = Color(0.9, 0.95, 1.0) #Albedo color of snow on surfaces
@export var snow_cap_height: float = 0.03 #Maximum snow thickness extruded on flat surfaces