Moving playground to its own menu option so main game can be worked on cleanly
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
extends Node3D
|
||||
|
||||
@export var player_spawn_position := Vector3(0.0, 2.0, 0.0)
|
||||
|
||||
@onready var _player: RigidBody3D = get_node_or_null("Player") as RigidBody3D
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_move_player_to_spawn()
|
||||
|
||||
|
||||
func _move_player_to_spawn() -> void:
|
||||
if _player == null:
|
||||
return
|
||||
_player.global_position = player_spawn_position
|
||||
_player.linear_velocity = Vector3.ZERO
|
||||
_player.angular_velocity = Vector3.ZERO
|
||||
Reference in New Issue
Block a user