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]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
4818002bbd
commit
d66570169a
@@ -1,6 +1,7 @@
|
||||
[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)
|
||||
@@ -8,6 +9,15 @@ 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]
|
||||
@@ -34,3 +44,11 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user