Three compounding issues, found via user testing: 1. Sprite was 2.56x2.56 units (raw 256px checkerboard at default pixel_size) — 5x wider than the player, and collision shapes sized to roughly match. Gave AnimatedSprite3D an explicit pixel_size (0.004) for a ~1 unit sprite, shrunk the solid CylinderShape3D to radius 0.4/height 1.0 and the Area3D trigger sphere to radius 0.6 accordingly (still >= the solid radius, so touching = interactable holds). 2. InteractionPrompt had zero vertical offset, sitting dead center of the (huge) sprite — rendering behind/inside it, so the "[F] Interact" hint never appeared even though proximity detection and the keypress itself worked (confirmed by the user: pressing F did work, the hint just never showed telling them to). Gave both NameLabel and InteractionPrompt proper offsets above the sprite. 3. Once the collision shapes shrank, a pre-existing ~0.7 unit gap between each POI's hand-placed Y (computed with the same radius-only height approximation that's only exact along a facet's straight edges, not its interior — same class of error as the earlier Ort6 out-of-bounds bug) and the true terrain surface became consequential: the small collider mostly floated above the real ground, giving wildly direction-dependent, sometimes entirely missing contact/interaction depending on approach angle. Root-fixed rather than re-deriving 36+ positions' exact heights by hand again: poi.gd/poi_gate.gd now raycast straight down against the terrain in _ready() (after one physics_frame, so the terrain's collision shape has had time to register) and snap themselves onto the real surface plus a small clearance. Verified headless: approaching a POI from 4 different directions now gives consistent ~0.56 unit contact distance and player_nearby=true in all four (previously: two directions barely touched at ~0.05 units with interaction never triggering, the other two behaved correctly — direction-dependent failure, now gone). Re-ran the full 6-gate chain (still passes) and gate-to-border-prop clearance across 3 randomized layouts (still 1.3-1.9 units clear, no regression).
54 lines
1.7 KiB
Plaintext
Executable File
54 lines
1.7 KiB
Plaintext
Executable File
[gd_scene format=3 uid="uid://be6ufrc3dsjge"]
|
|
|
|
[ext_resource type="Script" uid="uid://c12tpdqhr2l5" path="res://world/poi/poi.gd" id="1_gwpk6"]
|
|
[ext_resource type="Texture2D" uid="uid://c3ajv7vb8c4fb" path="res://assets/debug/checkerboard.png" id="2_yof6k"]
|
|
|
|
[sub_resource type="SphereShape3D" id="SphereShape3D_gwpk6"]
|
|
radius = 0.6
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_0surh"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": ExtResource("2_yof6k")
|
|
}],
|
|
"loop": true,
|
|
"name": &"default",
|
|
"speed": 5.0
|
|
}]
|
|
|
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_58c6p"]
|
|
radius = 0.4
|
|
height = 1.0
|
|
|
|
[node name="POI" type="Area3D" unique_id=1770000468]
|
|
script = ExtResource("1_gwpk6")
|
|
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=2115487742]
|
|
shape = SubResource("SphereShape3D_gwpk6")
|
|
|
|
[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="." unique_id=1205831120]
|
|
billboard = 2
|
|
pixel_size = 0.004
|
|
sprite_frames = SubResource("SpriteFrames_0surh")
|
|
|
|
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=1488376384]
|
|
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D" unique_id=461988177]
|
|
shape = SubResource("CylinderShape3D_58c6p")
|
|
|
|
[node name="Billboard" type="Node3D" parent="." unique_id=36237536]
|
|
transform = Transform3D(6, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0)
|
|
|
|
[node name="NameLabel" type="Label3D" parent="Billboard" unique_id=1419647885]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.13, 0)
|
|
billboard = 1
|
|
text = "???"
|
|
font_size = 16
|
|
|
|
[node name="InteractionPrompt" type="Label3D" parent="Billboard" unique_id=2059219662]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.09, 0)
|
|
visible = false
|
|
billboard = 1
|
|
font_size = 12
|