main
Martin Felis 2024-07-12 11:27:10 +02:00
parent d40c299964
commit 71550b15fe
5 changed files with 12 additions and 12 deletions

View File

@ -10,7 +10,7 @@ const JUMP_VELOCITY = 2.5
var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
var inventory:Inventory = Inventory.new()
var last_nonzero_velocity:Vector3 = Vector3.ZERO
var last_nonzero_velocity:Vector3 = Vector3.BACK
signal trigger_message(message:String)
@ -34,7 +34,7 @@ func _physics_process(delta):
if velocity.length_squared() > 0.1 * 0.1:
last_nonzero_velocity = velocity.normalized()
geometry.look_at(position - last_nonzero_velocity)
func on_item_picked_up(item:Item):

View File

@ -16,4 +16,4 @@ visible = false
transform = Transform3D(1, -2.20965e-22, 8.47033e-22, 2.20965e-22, 1, 0, -8.47033e-22, 0, 1, 2.01948e-28, 1.21587, -1.82921e-07)
[node name="Engineer_Backpack" parent="Rig/Skeleton3D" index="3"]
transform = Transform3D(1, 1.25214e-21, -1.69407e-21, -1.25214e-21, 1, 0, 1.69407e-21, 0, 1, -3.05176e-05, 1.21587, -1.82921e-07)
transform = Transform3D(1, 1.25214e-21, -1.69407e-21, -1.25214e-21, 1, 7.17465e-43, 1.69407e-21, 1.43493e-42, 1, -3.05176e-05, 1.21587, -1.82921e-07)

View File

@ -39,24 +39,24 @@ bones/46/position = Vector3(-0.510844, 0.788312, 0.0597369)
bones/46/rotation = Quaternion(-0.758253, -1.52737e-07, 0.651961, -1.11759e-08)
[node name="Knife_Offhand" parent="Rig/Skeleton3D" index="0"]
transform = Transform3D(4.18024e-07, 0.262863, 0.964832, 0.999999, -3.99356e-07, -9.13908e-08, 4.9995e-07, 0.964833, -0.262863, 0.507764, 0.636705, -0.0185362)
transform = Transform3D(9.17323e-08, 0.262865, 0.964832, 0.999999, -5.48367e-07, 4.74853e-07, 8.68286e-07, 0.964832, -0.262865, 0.507764, 0.636705, -0.0185365)
visible = false
[node name="1H_Crossbow" parent="Rig/Skeleton3D" index="1"]
transform = Transform3D(0.988701, -0.149895, 4.88869e-07, 1.74261e-07, -3.68729e-07, -0.999999, 0.149895, 0.988701, -6.19239e-07, -0.489506, 0.745658, 0.096339)
transform = Transform3D(0.988701, -0.149894, -4.17134e-07, -8.6882e-07, -1.08398e-06, -0.999999, 0.149894, 0.988702, -1.49706e-06, -0.489506, 0.745658, 0.096339)
visible = false
[node name="2H_Crossbow" parent="Rig/Skeleton3D" index="2"]
transform = Transform3D(0.988701, -0.149895, 4.88869e-07, 1.74261e-07, -3.68729e-07, -0.999999, 0.149895, 0.988701, -6.19239e-07, -0.489506, 0.745658, 0.096339)
transform = Transform3D(0.988701, -0.149894, -4.17134e-07, -8.6882e-07, -1.08398e-06, -0.999999, 0.149894, 0.988702, -1.49706e-06, -0.489506, 0.745658, 0.096339)
visible = false
[node name="Knife" parent="Rig/Skeleton3D" index="3"]
transform = Transform3D(-4.8469e-07, -0.149894, 0.988701, 0.999999, -2.20542e-07, 1.925e-07, 4.69992e-07, 0.988701, 0.149894, -0.491058, 0.64103, 0.10658)
transform = Transform3D(4.21314e-07, -0.149893, 0.988701, 0.999999, -9.35798e-07, -8.50581e-07, 1.34781e-06, 0.988702, 0.149894, -0.491058, 0.64103, 0.10658)
visible = false
[node name="Throwable" parent="Rig/Skeleton3D" index="4"]
transform = Transform3D(-4.6895e-07, -0.149894, 0.988701, 0.999999, -2.05809e-07, 1.78814e-07, 4.57477e-07, 0.988701, 0.149894, -0.518076, 0.64103, 0.28479)
transform = Transform3D(4.37053e-07, -0.149894, 0.988701, 0.999999, -9.21064e-07, -8.64267e-07, 1.3353e-06, 0.988702, 0.149894, -0.518076, 0.64103, 0.28479)
visible = false
[node name="Rogue_Cape" parent="Rig/Skeleton3D" index="5"]
transform = Transform3D(0.996275, -5.14962e-09, 0.0862353, 5.13043e-09, 1, 4.44077e-10, -0.0862353, 1.8939e-15, 0.996275, -4.17227e-09, 1.20227, 1.53446e-15)
transform = Transform3D(0.996275, -5.14962e-09, 0.0862354, 5.13044e-09, 1, 4.44078e-10, -0.0862354, 1.47756e-15, 0.996275, -4.17227e-09, 1.20227, 1.19714e-15)

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dhpc2xvlfln7o"]
[ext_resource type="Script" path="res://objects/Actionable.gd" id="1_qvxan"]
[ext_resource type="Script" path="res://objects/actionable.gd" id="1_qvxan"]
[node name="Actionable" type="Area3D"]
collision_layer = 16

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=4 format=3 uid="uid://da5r82nvypfk4"]
[ext_resource type="Script" path="res://pickup_item.gd" id="1_ec7o8"]
[ext_resource type="Script" path="res://objects/pickup_item.gd" id="1_1i8k2"]
[ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="2_dph0g"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_1ndog"]
@ -9,7 +9,7 @@ radius = 0.15682
[node name="Item" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00393829, 0)
script = ExtResource("1_ec7o8")
script = ExtResource("1_1i8k2")
item = ExtResource("2_dph0g")
[node name="Area3D" type="Area3D" parent="."]