Preview:
extends RigidBody3D

@export var move_speed : float = 2.0

func _physics_process(delta: float) -> void:
	if Input.is_physical_key_pressed(KEY_LEFT):
		apply_force(Vector3.LEFT * move_speed)
	elif Input.is_physical_key_pressed():
		

func _on_body_entered(body: Node) -> void:
	if body.is_in_group("Tree"):
		get_tree().reload_current_scene()
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter