zoom out slower, higher speed mode probability

This commit is contained in:
interfisch 2025-03-30 10:17:33 +02:00
parent 3324d4504f
commit d099cde59e
2 changed files with 5 additions and 5 deletions

View file

@ -22,15 +22,15 @@ const caroffset= 32+4 #space cars on start line
const caroffset_side= 16
const caroffset_rear= 32+16
var viewCarMargin=Vector2(0.9,0.9) #1=zoom out full speed when car is at border. 0.9 zoom out full speed when car is 10% away from border
var viewCarMargin=Vector2(1.0,1.0) #1=zoom out full speed when car is at border. 0.9 zoom out full speed when car is 10% away from border
var viewCarMargin_zoomstart=viewCarMargin-Vector2(0.3,0.3) #start zooming out
var viewCarMargin_zoombackup=viewCarMargin_zoomstart-Vector2(0.1,0.1) #fullspeed zooming back in
var zoomspeed=1.0
var zoomspeed_backup=0.1 #relative to screen size
var zoomspeed=0.7
var zoomspeed_backup=0.15 #relative to screen size
var zoom_normal=1.5
const CAMERA_POSITION_SPEED=0.025 #0.0 - 1.0, higher=faster
var camera_zoom_out_lookahead_time=1.5 #predicted position of car in t seconds for camera coverage. greater value=earlier zoom out and movement of camera
var camera_zoom_out_lookahead_time=1.0 #predicted position of car in t seconds for camera coverage. greater value=earlier zoom out and movement of camera
var running=false

View file

@ -72,7 +72,7 @@ func _unhandled_key_input(event: InputEvent) -> void:
func _on_timer_timeout() -> void: #Start Game
print("Game starting")
if (randi() % 5 == 0):
if (randi() % 3 == 0):
Gamestate.setCarPreset("fast")
else:
Gamestate.setCarPreset("normal")