feat: tweak on input space

This commit is contained in:
2025-04-13 11:33:24 +02:00
parent 8eaff042c5
commit aeddc7d961
6 changed files with 42 additions and 10 deletions

13
scenes/game.tscn Normal file
View File

@@ -0,0 +1,13 @@
[gd_scene load_steps=3 format=3 uid="uid://3a8kk828n1m1"]
[ext_resource type="Texture2D" uid="uid://bsd3o6sy0cdc5" path="res://icon.svg" id="1_uwrxv"]
[ext_resource type="Script" uid="uid://cnivcmo6851u6" path="res://scenes/goatdot.gd" id="2_yqjtg"]
[node name="game" type="Node3D"]
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2)
[node name="Goatdot" type="Sprite3D" parent="."]
texture = ExtResource("1_uwrxv")
script = ExtResource("2_yqjtg")

16
scenes/goatdot.gd Normal file
View File

@@ -0,0 +1,16 @@
extends Sprite3D
var tweak = false
var OG_transform = transform
func _input(event):
if event.is_action_pressed("ui_accept"):
self.tweak = not self.tweak
func _physics_process(delta):
if self.tweak:
rotate_x(PI/9)
rotate_y(PI/5)
rotate_z(PI/4)
else:
transform = OG_transform

1
scenes/goatdot.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://cnivcmo6851u6