Merge branch 'fix/third-person' into 'develop'

🐛 hide 3rd person from the start and show it if required

See merge request open-fpsz/open-fpsz!90
This commit is contained in:
anyreso 2024-04-29 16:17:14 +00:00
commit bfee9815a3
2 changed files with 2 additions and 1 deletions

View file

@ -83,10 +83,10 @@ func _setup_pawn(_new_player_id : int) -> void:
pawn_player = self
# set the spring arm translation to be about head height level
$Smoothing/SpringArm3D.transform = Transform3D().translated(Vector3(0, collision_shape.shape.height / 2, 0) * 0.9)
$Smoothing/ThirdPerson.hide()
else:
# set the iff attachment translation to be about head height level
$Smoothing/ThirdPerson/IFFAttachment.transform = Transform3D().translated(Vector3(0, collision_shape.shape.height / 2, 0) * 0.9)
$Smoothing/ThirdPerson.show()
hud.hide()
weapon.hide()

View file

@ -284,6 +284,7 @@ carrier = NodePath("../../..")
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1.559e-08, -0.462981, -0.178329)
[node name="ThirdPerson" type="Node3D" parent="Smoothing"]
visible = false
[node name="PlayerMesh" parent="Smoothing/ThirdPerson" node_paths=PackedStringArray("spine_ik_target_attachment") instance=ExtResource("2_beyex")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)