Move hand gear forward into the palm
Full build / Import + headless tests (push) Successful in 40s
Full build / Full desktop build + optional release (push) Skipped

This commit is contained in:
zwitschi committed 2026-11-02 19:33:42 +01:00
1 parent 7150bd7673
commit 58cf12fd1d
9 files changed
+45 -15

No files matched your search

+7
View File
@@ -179,6 +179,11 @@ const GEAR_OFFSETS := {
"lanyard": Vector3(0, 0, 0.04),
"firefighter_helmet": Vector3(0, 0.03, 0),
}
## Hand gear is authored around the wrist proxy. The palm sits ~4 cm in front
## of that origin, so without this offset the first phone/flashlight versions
## were partly buried inside the hand. Keep the grip axis and move the whole
## item forward into the open palm.
const HAND_ITEM_FORWARD := Vector3(0, 0, 0.04)
const GEAR_ATTACH := {
"cap": "head", "beanie": "head", "hood": "head", "sunglasses": "head",
"firefighter_helmet": "head",
@@ -746,6 +751,8 @@ func _attach_gear(gear_name: String) -> bool:
return false
if GEAR_OFFSETS.has(gear_name):
node.position += GEAR_OFFSETS[gear_name]
if str(GEAR_ATTACH[gear_name]) == "hand":
node.position += HAND_ITEM_FORWARD
_detail_nodes.append(node)
var ao := Materials.load_ao(BLENDER_GEAR_DIR + gear_name + "_ao.png")
for child in node.find_children("*", "MeshInstance3D", true, false):