Godot interaction system init

This commit is contained in:
2026-08-17 20:06:51 +03:00
commit a86839c8cd
53 changed files with 2134 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
extends Node3D
@export var moveDistance: float = 2.0
@export var moveSpeed: float = 3.0
var up: bool = false
var startPos: Vector3 = Vector3.ZERO
func _ready():
startPos = global_position
func toggleMove(button: Button3D):
up = !up
func holdMove(button: Button3D):
up = true
func releaseMove(button: Button3D):
up = false
func _physics_process(delta):
var target: Vector3 = startPos
if up:
target += Vector3(0, moveDistance, 0)
global_position = global_position.lerp(target, delta * moveSpeed)
+1
View File
@@ -0,0 +1 @@
uid://cvg1f1wtahy0t