stash changes added as intended

This commit is contained in:
ced
2026-07-17 17:52:55 -05:00
parent 66f3c13d61
commit 5b29f61df9
28 changed files with 118 additions and 81 deletions
+3 -3
View File
@@ -4,12 +4,12 @@ importer="scene"
importer_version=1 importer_version=1
type="PackedScene" type="PackedScene"
uid="uid://fp0gcwcyfd7g" uid="uid://fp0gcwcyfd7g"
path="res://.godot/imported/Dart.glb-1915508013a3ba450ece7791a940f49a.scn" path="res://.godot/imported/Dart.glb-82b423f0f21d37c1bf28626083e1030e.scn"
[deps] [deps]
source_file="res://models/Dart/Dart.glb" source_file="res://Models/Dart/Dart.glb"
dest_files=["res://.godot/imported/Dart.glb-1915508013a3ba450ece7791a940f49a.scn"] dest_files=["res://.godot/imported/Dart.glb-82b423f0f21d37c1bf28626083e1030e.scn"]
[params] [params]
+3 -3
View File
@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://bobnv6cyi7dc6" uid="uid://bobnv6cyi7dc6"
path.s3tc="res://.godot/imported/Dart_Dart-Default.png-0e7a1d15ddbe7a83e812da08a07777be.s3tc.ctex" path.s3tc="res://.godot/imported/Dart_Dart-Default.png-4bd6068152c7966988ca2c23bd03ba76.s3tc.ctex"
metadata={ metadata={
"imported_formats": ["s3tc_bptc"], "imported_formats": ["s3tc_bptc"],
"vram_texture": true "vram_texture": true
@@ -14,8 +14,8 @@ generator_parameters={
[deps] [deps]
source_file="res://models/Dart/Dart_Dart-Default.png" source_file="res://Models/Dart/Dart_Dart-Default.png"
dest_files=["res://.godot/imported/Dart_Dart-Default.png-0e7a1d15ddbe7a83e812da08a07777be.s3tc.ctex"] dest_files=["res://.godot/imported/Dart_Dart-Default.png-4bd6068152c7966988ca2c23bd03ba76.s3tc.ctex"]
[params] [params]
+3 -3
View File
@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://bqxi7x76uv4tq" uid="uid://bqxi7x76uv4tq"
path.s3tc="res://.godot/imported/Dart_Wings-Default.png-40c0dfeb00a83025280623f0682c439a.s3tc.ctex" path.s3tc="res://.godot/imported/Dart_Wings-Default.png-358040735cbc551a0d2abb04506c708a.s3tc.ctex"
metadata={ metadata={
"imported_formats": ["s3tc_bptc"], "imported_formats": ["s3tc_bptc"],
"vram_texture": true "vram_texture": true
@@ -14,8 +14,8 @@ generator_parameters={
[deps] [deps]
source_file="res://models/Dart/Dart_Wings-Default.png" source_file="res://Models/Dart/Dart_Wings-Default.png"
dest_files=["res://.godot/imported/Dart_Wings-Default.png-40c0dfeb00a83025280623f0682c439a.s3tc.ctex"] dest_files=["res://.godot/imported/Dart_Wings-Default.png-358040735cbc551a0d2abb04506c708a.s3tc.ctex"]
[params] [params]
+3 -3
View File
@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://c7jxj25ophbsb" uid="uid://c7jxj25ophbsb"
path="res://.godot/imported/Dart-Default.png-a33b33ed400b7be306d77b583c7be7f9.ctex" path="res://.godot/imported/Dart-Default.png-2feb9f56821a29d976ec19a662a6977f.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://models/Dart/Textures/Dart-Default.png" source_file="res://Models/Dart/Textures/Dart-Default.png"
dest_files=["res://.godot/imported/Dart-Default.png-a33b33ed400b7be306d77b583c7be7f9.ctex"] dest_files=["res://.godot/imported/Dart-Default.png-2feb9f56821a29d976ec19a662a6977f.ctex"]
[params] [params]
@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://bhbtrcw8xbp1g" uid="uid://bhbtrcw8xbp1g"
path="res://.godot/imported/Wings-Default.png-eae61e73cf593192bedca09144cf69c9.ctex" path="res://.godot/imported/Wings-Default.png-b4a7a92ebd237d86daaae21adc10d873.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://models/Dart/Textures/Wings-Default.png" source_file="res://Models/Dart/Textures/Wings-Default.png"
dest_files=["res://.godot/imported/Wings-Default.png-eae61e73cf593192bedca09144cf69c9.ctex"] dest_files=["res://.godot/imported/Wings-Default.png-b4a7a92ebd237d86daaae21adc10d873.ctex"]
[params] [params]
@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://ch4b1pnokuu8d" uid="uid://ch4b1pnokuu8d"
path="res://.godot/imported/Wings-Red-Blue.png-3aeab106f5aa6ca134cd01dfffda6e92.ctex" path="res://.godot/imported/Wings-Red-Blue.png-701faf0c1b6c3af11eb52058dfda7798.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://models/Dart/Textures/Wings-Red-Blue.png" source_file="res://Models/Dart/Textures/Wings-Red-Blue.png"
dest_files=["res://.godot/imported/Wings-Red-Blue.png-3aeab106f5aa6ca134cd01dfffda6e92.ctex"] dest_files=["res://.godot/imported/Wings-Red-Blue.png-701faf0c1b6c3af11eb52058dfda7798.ctex"]
[params] [params]
+3 -3
View File
@@ -4,12 +4,12 @@ importer="scene"
importer_version=1 importer_version=1
type="PackedScene" type="PackedScene"
uid="uid://c7ysojicqbx2v" uid="uid://c7ysojicqbx2v"
path="res://.godot/imported/Dartboard-Proto.glb-07b05da7855d19179cd4c8d9bf1e961a.scn" path="res://.godot/imported/Dartboard-Proto.glb-f1487085b0c09a3b97c6aa8be3864f01.scn"
[deps] [deps]
source_file="res://models/Dartboard/Dartboard-Proto.glb" source_file="res://Models/Dartboard/Dartboard-Proto.glb"
dest_files=["res://.godot/imported/Dartboard-Proto.glb-07b05da7855d19179cd4c8d9bf1e961a.scn"] dest_files=["res://.godot/imported/Dartboard-Proto.glb-f1487085b0c09a3b97c6aa8be3864f01.scn"]
[params] [params]
@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://dk6gnbvgumq7c" uid="uid://dk6gnbvgumq7c"
path.s3tc="res://.godot/imported/Dartboard-Proto_Cork.png-f6ca98f1a3e5263177736c84c407eac1.s3tc.ctex" path.s3tc="res://.godot/imported/Dartboard-Proto_Cork.png-9700f4c0b675dee65dc4e1c14aa931b3.s3tc.ctex"
metadata={ metadata={
"imported_formats": ["s3tc_bptc"], "imported_formats": ["s3tc_bptc"],
"vram_texture": true "vram_texture": true
@@ -14,8 +14,8 @@ generator_parameters={
[deps] [deps]
source_file="res://models/Dartboard/Dartboard-Proto_Cork.png" source_file="res://Models/Dartboard/Dartboard-Proto_Cork.png"
dest_files=["res://.godot/imported/Dartboard-Proto_Cork.png-f6ca98f1a3e5263177736c84c407eac1.s3tc.ctex"] dest_files=["res://.godot/imported/Dartboard-Proto_Cork.png-9700f4c0b675dee65dc4e1c14aa931b3.s3tc.ctex"]
[params] [params]
@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cs381hglod4k1" uid="uid://cs381hglod4k1"
path.s3tc="res://.godot/imported/Dartboard-Proto_Green.png-1343c7dd3385278600e40228a331d6a5.s3tc.ctex" path.s3tc="res://.godot/imported/Dartboard-Proto_Green.png-0f939f85106a12f4ae54352c096222a2.s3tc.ctex"
metadata={ metadata={
"imported_formats": ["s3tc_bptc"], "imported_formats": ["s3tc_bptc"],
"vram_texture": true "vram_texture": true
@@ -14,8 +14,8 @@ generator_parameters={
[deps] [deps]
source_file="res://models/Dartboard/Dartboard-Proto_Green.png" source_file="res://Models/Dartboard/Dartboard-Proto_Green.png"
dest_files=["res://.godot/imported/Dartboard-Proto_Green.png-1343c7dd3385278600e40228a331d6a5.s3tc.ctex"] dest_files=["res://.godot/imported/Dartboard-Proto_Green.png-0f939f85106a12f4ae54352c096222a2.s3tc.ctex"]
[params] [params]
@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cvv4akpwsudu3" uid="uid://cvv4akpwsudu3"
path.s3tc="res://.godot/imported/Dartboard-Proto_Red.png-2f5c85ebd09c13e9a8c29c036d146bf7.s3tc.ctex" path.s3tc="res://.godot/imported/Dartboard-Proto_Red.png-e757930c4a42a8dc67547b3409641a91.s3tc.ctex"
metadata={ metadata={
"imported_formats": ["s3tc_bptc"], "imported_formats": ["s3tc_bptc"],
"vram_texture": true "vram_texture": true
@@ -14,8 +14,8 @@ generator_parameters={
[deps] [deps]
source_file="res://models/Dartboard/Dartboard-Proto_Red.png" source_file="res://Models/Dartboard/Dartboard-Proto_Red.png"
dest_files=["res://.godot/imported/Dartboard-Proto_Red.png-2f5c85ebd09c13e9a8c29c036d146bf7.s3tc.ctex"] dest_files=["res://.godot/imported/Dartboard-Proto_Red.png-e757930c4a42a8dc67547b3409641a91.s3tc.ctex"]
[params] [params]
+3 -3
View File
@@ -4,12 +4,12 @@ importer="scene"
importer_version=1 importer_version=1
type="PackedScene" type="PackedScene"
uid="uid://6nml3641dpce" uid="uid://6nml3641dpce"
path="res://.godot/imported/Dartboard.glb-70a9ef107f397b7ec5b8defc699ed8f4.scn" path="res://.godot/imported/Dartboard.glb-35f0707e0e9b18915b2d48c5c14ac862.scn"
[deps] [deps]
source_file="res://models/Dartboard/Dartboard.glb" source_file="res://Models/Dartboard/Dartboard.glb"
dest_files=["res://.godot/imported/Dartboard.glb-70a9ef107f397b7ec5b8defc699ed8f4.scn"] dest_files=["res://.godot/imported/Dartboard.glb-35f0707e0e9b18915b2d48c5c14ac862.scn"]
[params] [params]
+3 -3
View File
@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://ctr7mydgfca75" uid="uid://ctr7mydgfca75"
path.s3tc="res://.godot/imported/Dartboard_Spider.png-ccb6376aa607c815653c986d40f57bd2.s3tc.ctex" path.s3tc="res://.godot/imported/Dartboard_Spider.png-3a7e01e42d10301e2794b3c6268069b4.s3tc.ctex"
metadata={ metadata={
"imported_formats": ["s3tc_bptc"], "imported_formats": ["s3tc_bptc"],
"vram_texture": true "vram_texture": true
@@ -14,8 +14,8 @@ generator_parameters={
[deps] [deps]
source_file="res://models/Dartboard/Dartboard_Spider.png" source_file="res://Models/Dartboard/Dartboard_Spider.png"
dest_files=["res://.godot/imported/Dartboard_Spider.png-ccb6376aa607c815653c986d40f57bd2.s3tc.ctex"] dest_files=["res://.godot/imported/Dartboard_Spider.png-3a7e01e42d10301e2794b3c6268069b4.s3tc.ctex"]
[params] [params]
+3 -3
View File
@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://b1vf3204p4ys6" uid="uid://b1vf3204p4ys6"
path="res://.godot/imported/Coffee.png-2f72aea401e4bc7da80c7f912a84a834.ctex" path="res://.godot/imported/Coffee.png-7ec89259677377dfb36274d8ce0e9258.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://models/Dartboard/Textures/Coffee.png" source_file="res://Models/Dartboard/Textures/Coffee.png"
dest_files=["res://.godot/imported/Coffee.png-2f72aea401e4bc7da80c7f912a84a834.ctex"] dest_files=["res://.godot/imported/Coffee.png-7ec89259677377dfb36274d8ce0e9258.ctex"]
[params] [params]
+3 -3
View File
@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://blvifdtblwcxg" uid="uid://blvifdtblwcxg"
path="res://.godot/imported/Cork.png-70386af4271685d05fa3d5283f1971fb.ctex" path="res://.godot/imported/Cork.png-8b577bb6a5aa8a82bae563118e794e18.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://models/Dartboard/Textures/Cork.png" source_file="res://Models/Dartboard/Textures/Cork.png"
dest_files=["res://.godot/imported/Cork.png-70386af4271685d05fa3d5283f1971fb.ctex"] dest_files=["res://.godot/imported/Cork.png-8b577bb6a5aa8a82bae563118e794e18.ctex"]
[params] [params]
+3 -3
View File
@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://dxxon6pdl5aw4" uid="uid://dxxon6pdl5aw4"
path="res://.godot/imported/Flowers.jpg-19c28aee85240c8ffd9c80787ef6fb0d.ctex" path="res://.godot/imported/Flowers.jpg-4755265eb848ca410e8aa3e15ab13280.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://models/Dartboard/Textures/Flowers.jpg" source_file="res://Models/Dartboard/Textures/Flowers.jpg"
dest_files=["res://.godot/imported/Flowers.jpg-19c28aee85240c8ffd9c80787ef6fb0d.ctex"] dest_files=["res://.godot/imported/Flowers.jpg-4755265eb848ca410e8aa3e15ab13280.ctex"]
[params] [params]
+3 -3
View File
@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://c2qvwu0v2uolj" uid="uid://c2qvwu0v2uolj"
path="res://.godot/imported/Green.png-eb27d74972834b4632d3203a5b38f965.ctex" path="res://.godot/imported/Green.png-6f1f5b0c58d2ec51c6b638c11ba4264b.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://models/Dartboard/Textures/Green.png" source_file="res://Models/Dartboard/Textures/Green.png"
dest_files=["res://.godot/imported/Green.png-eb27d74972834b4632d3203a5b38f965.ctex"] dest_files=["res://.godot/imported/Green.png-6f1f5b0c58d2ec51c6b638c11ba4264b.ctex"]
[params] [params]
+3 -3
View File
@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://b1lclw6s66ou7" uid="uid://b1lclw6s66ou7"
path="res://.godot/imported/Red.png-e8ae9088a22ccb4fefc1b82ba8470c21.ctex" path="res://.godot/imported/Red.png-5fe46449e66850590891dfad1c596ebf.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://models/Dartboard/Textures/Red.png" source_file="res://Models/Dartboard/Textures/Red.png"
dest_files=["res://.godot/imported/Red.png-e8ae9088a22ccb4fefc1b82ba8470c21.ctex"] dest_files=["res://.godot/imported/Red.png-5fe46449e66850590891dfad1c596ebf.ctex"]
[params] [params]
+3 -3
View File
@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://b3qw07lguggu6" uid="uid://b3qw07lguggu6"
path="res://.godot/imported/Spider.png-a8e04f1e7205fbfb2d0cd4a1c5915278.ctex" path="res://.godot/imported/Spider.png-3f1c947c2e5bcf6b7d7e259d62e6005a.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://models/Dartboard/Textures/Spider.png" source_file="res://Models/Dartboard/Textures/Spider.png"
dest_files=["res://.godot/imported/Spider.png-a8e04f1e7205fbfb2d0cd4a1c5915278.ctex"] dest_files=["res://.godot/imported/Spider.png-3f1c947c2e5bcf6b7d7e259d62e6005a.ctex"]
[params] [params]
+3 -3
View File
@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://ccoht16d1pkr3" uid="uid://ccoht16d1pkr3"
path="res://.godot/imported/Stars.jpg-c1f1144d29f4cf5836c32017a9867b0b.ctex" path="res://.godot/imported/Stars.jpg-9cc50027cae80115a1f7344b30169970.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://models/Dartboard/Textures/Stars.jpg" source_file="res://Models/Dartboard/Textures/Stars.jpg"
dest_files=["res://.godot/imported/Stars.jpg-c1f1144d29f4cf5836c32017a9867b0b.ctex"] dest_files=["res://.godot/imported/Stars.jpg-9cc50027cae80115a1f7344b30169970.ctex"]
[params] [params]
+5 -1
View File
@@ -20,4 +20,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.10033989, 0)
shape = SubResource("CapsuleShape3D_xxti7") shape = SubResource("CapsuleShape3D_xxti7")
[node name="Dart2" parent="RigidBody3D" unique_id=1655536183 instance=ExtResource("2_mlvfh")] [node name="Dart2" parent="RigidBody3D" unique_id=1655536183 instance=ExtResource("2_mlvfh")]
transform = Transform3D(0.4, 0, 0, 0, 0.39999995, 0, 0, 0, 0.39999995, 0, -1.4526575, 0.015561234) transform = Transform3D(0.4, 0, 0, 0, 0.39999995, 0, 0, 0, 0.39999995, 0, -1.4526575, 0.00214429)
[node name="RayCast3D" type="RayCast3D" parent="RigidBody3D" unique_id=892030560]
transform = Transform3D(1, 0, 0, 0, -1, 8.742278e-08, 0, -8.742278e-08, -1, 0, 0.9578117, 0)
collide_with_areas = true
+14 -11
View File
@@ -2,6 +2,9 @@ extends RigidBody3D
class_name Dart class_name Dart
#ray cast
@onready var point = $RayCast3D
#states #states
var in_flight: bool = false var in_flight: bool = false
var dragging: bool = false var dragging: bool = false
@@ -21,7 +24,7 @@ const HISTORY_LENGTH = 6
@export var max_drag_speed: float = 42.0 # clamp so it doesn't go insane @export var max_drag_speed: float = 42.0 # clamp so it doesn't go insane
@export_range(-180,180) var angle_of_plane: float = 15.0 @export_range(-180,180) var angle_of_plane: float = 15.0
@export var throw_force_multiplier: float = 0.8 # scale raw throw velocity down if it's too fast @export var throw_force_multiplier: float = 0.8 # scale raw throw velocity down if it's too fast
@export var max_throw_speed: float = 42.0 # hard cap so fast flicks don't kill the arc @export var max_throw_speed: float = 64.0 # hard cap so fast flicks don't kill the arc
@export var flight_gravity_scale: float = 4.0 # higher = more visible arc @export var flight_gravity_scale: float = 4.0 # higher = more visible arc
@export var nose_align_speed: float = 1.0 # how fast dart rotates to face velocity @export var nose_align_speed: float = 1.0 # how fast dart rotates to face velocity
@export var dart_forward_axis: Vector3 = Vector3.FORWARD @export var dart_forward_axis: Vector3 = Vector3.FORWARD
@@ -46,7 +49,7 @@ func start_drag(camera: Camera3D, mouse_pos: Vector2, hit_point: Vector3):
drag_plane = Plane(tilt.normalized(), hit_point) drag_plane = Plane(tilt.normalized(), hit_point)
drag_offset = global_position - hit_point drag_offset = global_position - hit_point
target_pos = global_position #fixes a bug where dart drops until mouse is moved. target_pos = global_position #fixes a bug where dart drops until mouse is moved.m
position_history.clear() position_history.clear()
time_history.clear() time_history.clear()
@@ -98,13 +101,15 @@ func _physics_process(delta):
if position_history.size() > HISTORY_LENGTH: if position_history.size() > HISTORY_LENGTH:
position_history.pop_front() position_history.pop_front()
time_history.pop_front() time_history.pop_front()
elif point.is_colliding():
var collider = point.get_collider()
if collider and collider.is_in_group("dartable"):
in_flight = false
dragging = false
await get_tree().create_timer(0.01).timeout
freeze_mode = RigidBody3D.FREEZE_MODE_STATIC
freeze = true
elif in_flight: elif in_flight:
# Debug: confirm Y velocity is dropping (becoming negative) each frame
print("local +X world dir: ", global_transform.basis.x)
print("local +Y world dir: ", global_transform.basis.y)
print("local +Z world dir: ", global_transform.basis.z)
print("velocity dir: ", linear_velocity.normalized())
# Align dart nose to face velocity direction (tip points the way it's flying) # Align dart nose to face velocity direction (tip points the way it's flying)
if linear_velocity.length() > 0.5: if linear_velocity.length() > 0.5:
_align_dart_to_velocity(delta) _align_dart_to_velocity(delta)
@@ -125,6 +130,7 @@ func _physics_process(delta):
target_basis, nose_align_speed * delta target_basis, nose_align_speed * delta
) )
func release_drag(): func release_drag():
if not dragging: if not dragging:
return return
@@ -141,9 +147,6 @@ func release_drag():
linear_velocity = velocity linear_velocity = velocity
# angular_velocity left as-is from physics, or compute your own spin here # angular_velocity left as-is from physics, or compute your own spin here
print("throw speed: %.2f" % velocity.length())
print("gravity_scale: ", gravity_scale)
print("linear_damp: ", linear_damp)
func calculate_throw_velocity() -> Vector3: func calculate_throw_velocity() -> Vector3:
if position_history.size() < 2: if position_history.size() < 2:
+12 -2
View File
@@ -3,7 +3,11 @@
[ext_resource type="Script" uid="uid://d1i0lhibtflvq" path="res://Scripts/Main.gd" id="1_fq6v0"] [ext_resource type="Script" uid="uid://d1i0lhibtflvq" path="res://Scripts/Main.gd" id="1_fq6v0"]
[ext_resource type="Script" uid="uid://x5kcjofb5pek" path="res://Scripts/DropCatcher.gd" id="3_qdhrm"] [ext_resource type="Script" uid="uid://x5kcjofb5pek" path="res://Scripts/DropCatcher.gd" id="3_qdhrm"]
[ext_resource type="Script" uid="uid://dnek55fao0l72" path="res://Scripts/ModifierTray.gd" id="5_kax6v"] [ext_resource type="Script" uid="uid://dnek55fao0l72" path="res://Scripts/ModifierTray.gd" id="5_kax6v"]
[ext_resource type="PackedScene" uid="uid://6nml3641dpce" path="res://Models/Dartboard/Dartboard.glb" id="5_thh7l"] [ext_resource type="PackedScene" uid="uid://6nml3641dpce" path="res://models/Dartboard/Dartboard.glb" id="5_thh7l"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_qu08v"]
height = 0.18115234
radius = 0.96484375
[node name="DartboardProto" type="Node3D" unique_id=1829621191 node_paths=PackedStringArray("dartboard_root")] [node name="DartboardProto" type="Node3D" unique_id=1829621191 node_paths=PackedStringArray("dartboard_root")]
script = ExtResource("1_fq6v0") script = ExtResource("1_fq6v0")
@@ -14,9 +18,15 @@ transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 2.65
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1020512688] [node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1020512688]
[node name="Dartboard" parent="." unique_id=1632971704 instance=ExtResource("5_thh7l")] [node name="Dartboard" parent="." unique_id=1632971704 groups=["dartable"] instance=ExtResource("5_thh7l")]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0.16272092, 1.2674973, 0) transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0.16272092, 1.2674973, 0)
[node name="Area3D" type="Area3D" parent="Dartboard" unique_id=470399503 groups=["dartable"]]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Dartboard/Area3D" unique_id=2058320974]
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, 1, 0, -1, -4.371139e-08, 0.003960803, 0.0015273094, 0.0637207)
shape = SubResource("CylinderShape3D_qu08v")
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=80012783] [node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=80012783]
[node name="DropCatcher" type="Control" parent="CanvasLayer" unique_id=1371111637 node_paths=PackedStringArray("camera", "main")] [node name="DropCatcher" type="Control" parent="CanvasLayer" unique_id=1371111637 node_paths=PackedStringArray("camera", "main")]
+8
View File
@@ -1,5 +1,13 @@
extends Node3D extends Node3D
@onready var dart_camera = $Camera3D
@onready var board_camera = $Board_camera
var camera: bool = false
func _unhandled_input(event): func _unhandled_input(event):
if event.is_action_pressed("restart"): if event.is_action_pressed("restart"):
get_tree().reload_current_scene() get_tree().reload_current_scene()
if event.is_action_pressed("camera"):
dart_camera.current = camera
board_camera.current = !camera
camera = !camera
+7
View File
@@ -3,6 +3,7 @@
[ext_resource type="Script" uid="uid://geqmah8kbko0" path="res://Scenes/main.gd" id="1_8gbba"] [ext_resource type="Script" uid="uid://geqmah8kbko0" path="res://Scenes/main.gd" id="1_8gbba"]
[ext_resource type="Script" uid="uid://ds3uiri3oc05v" path="res://Scenes/camera_3d.gd" id="1_bo1nx"] [ext_resource type="Script" uid="uid://ds3uiri3oc05v" path="res://Scenes/camera_3d.gd" id="1_bo1nx"]
[ext_resource type="PackedScene" uid="uid://bswbcehkkqbk0" path="res://Scenes/Dart.tscn" id="1_jjgbg"] [ext_resource type="PackedScene" uid="uid://bswbcehkkqbk0" path="res://Scenes/Dart.tscn" id="1_jjgbg"]
[ext_resource type="PackedScene" uid="uid://cqe6bo8v564dc" path="res://Scenes/Dartboard-Proto.tscn" id="4_jjvhh"]
[sub_resource type="BoxShape3D" id="BoxShape3D_qu08v"] [sub_resource type="BoxShape3D" id="BoxShape3D_qu08v"]
size = Vector3(1, 0.01, 1) size = Vector3(1, 0.01, 1)
@@ -38,3 +39,9 @@ shape = SubResource("BoxShape3D_qu08v")
[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D/CollisionShape3D" unique_id=849495197] [node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D/CollisionShape3D" unique_id=849495197]
mesh = SubResource("BoxMesh_xxti7") mesh = SubResource("BoxMesh_xxti7")
skeleton = NodePath("") skeleton = NodePath("")
[node name="DartboardProto" parent="." unique_id=1829621191 groups=["dartable"] instance=ExtResource("4_jjvhh")]
transform = Transform3D(-2.1855695e-07, 0, 5, 0, 5, 0, -5, 0, -2.1855695e-07, -0.38649988, 1.5309646, 18.770962)
[node name="Board_camera" type="Camera3D" parent="." unique_id=1404073028]
transform = Transform3D(-0.6146763, 0, -0.78877944, 0, 1, 0, 0.78877944, 0, -0.6146763, -8.792414, 7.5380507, 13.506961)
+3 -3
View File
@@ -4,12 +4,12 @@ importer="scene"
importer_version=1 importer_version=1
type="PackedScene" type="PackedScene"
uid="uid://cjq45anerhxnk" uid="uid://cjq45anerhxnk"
path="res://.godot/imported/Dart.glb-e68d17366fac688e4c81cf4cc62e1175.scn" path="res://.godot/imported/Dart.glb-c455f16296a9e65bbb66a88577786d63.scn"
[deps] [deps]
source_file="res://models/Dart.glb" source_file="res://Models/Dart.glb"
dest_files=["res://.godot/imported/Dart.glb-e68d17366fac688e4c81cf4cc62e1175.scn"] dest_files=["res://.godot/imported/Dart.glb-c455f16296a9e65bbb66a88577786d63.scn"]
[params] [params]
+3 -3
View File
@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://62njxkpga6e8" uid="uid://62njxkpga6e8"
path.s3tc="res://.godot/imported/Dart_Dart-Default.png-ffb5dce2e6bbf58fe2b00949ee100702.s3tc.ctex" path.s3tc="res://.godot/imported/Dart_Dart-Default.png-6f8aeb995de95881fb9c9013d8c53895.s3tc.ctex"
metadata={ metadata={
"imported_formats": ["s3tc_bptc"], "imported_formats": ["s3tc_bptc"],
"vram_texture": true "vram_texture": true
@@ -14,8 +14,8 @@ generator_parameters={
[deps] [deps]
source_file="res://models/Dart_Dart-Default.png" source_file="res://Models/Dart_Dart-Default.png"
dest_files=["res://.godot/imported/Dart_Dart-Default.png-ffb5dce2e6bbf58fe2b00949ee100702.s3tc.ctex"] dest_files=["res://.godot/imported/Dart_Dart-Default.png-6f8aeb995de95881fb9c9013d8c53895.s3tc.ctex"]
[params] [params]
+3 -3
View File
@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://b7bsi4ury2lve" uid="uid://b7bsi4ury2lve"
path.s3tc="res://.godot/imported/Dart_Wings-Default.png-dcf030c3d00e4d9573d0a3e9c88fff0a.s3tc.ctex" path.s3tc="res://.godot/imported/Dart_Wings-Default.png-5fe09a8386222e14f1aee4e3675a93cb.s3tc.ctex"
metadata={ metadata={
"imported_formats": ["s3tc_bptc"], "imported_formats": ["s3tc_bptc"],
"vram_texture": true "vram_texture": true
@@ -14,8 +14,8 @@ generator_parameters={
[deps] [deps]
source_file="res://models/Dart_Wings-Default.png" source_file="res://Models/Dart_Wings-Default.png"
dest_files=["res://.godot/imported/Dart_Wings-Default.png-dcf030c3d00e4d9573d0a3e9c88fff0a.s3tc.ctex"] dest_files=["res://.godot/imported/Dart_Wings-Default.png-5fe09a8386222e14f1aee4e3675a93cb.s3tc.ctex"]
[params] [params]
+6 -1
View File
@@ -35,6 +35,7 @@ import/blender/enabled=false
[global_group] [global_group]
Dart="All throwable darts" Dart="All throwable darts"
dartable="Surfaces that the dart can stick into"
[input] [input]
@@ -46,7 +47,11 @@ leftClick={
restart={ restart={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ]
}
camera={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":67,"key_label":0,"unicode":99,"location":0,"echo":false,"script":null)
] ]
} }