Files
gamejamgame/scenes/game_scene/levels/3dlevel.tscn
T
ASOwnerYTandClaude Opus 5 d66570169a feat(rope): reel tether length to track player distance
Rope length was baked once at load, so it sagged when players closed in
and the pin joints fought when they separated.

Total length now eases toward clamp(gap * (1 + slack), min, max) at
reel_speed. Joint3D only derives anchors from node transforms when the
joint is configured on tree entry, so anchors are pushed straight to
PhysicsServer3D.pin_joint_set_local_a/_b after resizing the capsules.

Also instances the rope in 3dlevel and solves the spawn arc's bow height
from the same target length, so the rope no longer lurches on frame one.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-07-25 17:37:06 +12:00

55 lines
2.1 KiB
Plaintext

[gd_scene format=3 uid="uid://4ajccsn6o10n"]
[ext_resource type="PackedScene" uid="uid://cbual4qbgv2fc" path="res://scenes/player.tscn" id="1_e2xum"]
[ext_resource type="PackedScene" uid="uid://x4xnc85khpl5" path="res://scenes/path_3d_rope.tscn" id="2_jetiq"]
[sub_resource type="BoxShape3D" id="BoxShape3D_xcqlg"]
size = Vector3(40, 2, 5)
[sub_resource type="BoxMesh" id="BoxMesh_xcqlg"]
size = Vector3(40, 2, 5)
[sub_resource type="Curve3D" id="Curve3D_jetiq"]
resource_local_to_scene = true
bake_interval = 512.0
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5),
"tilts": PackedFloat32Array(0, 0)
}
point_count = 2
[node name="3Dlevel" type="Node3D" unique_id=1570360592]
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=362192398]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D" unique_id=351393792]
shape = SubResource("BoxShape3D_xcqlg")
[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D" unique_id=336650218]
mesh = SubResource("BoxMesh_xcqlg")
[node name="Camera3D" type="Camera3D" parent="." unique_id=2114757393]
transform = Transform3D(1, 0, 0, 0, 0.9961947, 0.08715574, 0, -0.08715574, 0.9961947, 0, 9, 23)
fov = 48.4
size = 50.0
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=716627405]
transform = Transform3D(1, 0, 0, 0, 0.25881907, 0.9659258, 0, -0.9659258, 0.25881907, 0, 0, 0)
shadow_enabled = true
[node name="Player1" parent="." unique_id=68487004 instance=ExtResource("1_e2xum")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8, 1, 0)
[node name="Player2" parent="." unique_id=432105976 instance=ExtResource("1_e2xum")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9, 1, 0)
player_id = 2
[node name="Path3DRope" parent="." unique_id=301387047 instance=ExtResource("2_jetiq")]
curve = SubResource("Curve3D_jetiq")
attach_start_path = NodePath("../Player1")
attach_end_path = NodePath("../Player2")
number_of_segments = 32
cable_thickness = 0.05
fixed_start_point = false