added emotion

This commit is contained in:
pennyrigate 2025-08-16 23:18:26 -04:00
parent bb702a88f0
commit 807cfb4b57
19 changed files with 340 additions and 14 deletions

View file

@ -37,7 +37,11 @@ func _physics_process(delta: float) -> void:
%AnimationPlayer.play("touch")
#Look
if %RayCast3D.is_colliding():
print(%RayCast3D.get_collider())
var collider = %RayCast3D.get_collider()
if collider.is_in_group("emotional"):
Hud.face.play(str(collider.get_parent().emotion))
else:
Hud.face.play("neutral")
if mouse_captured: _handle_joypad_camera_rotation(delta)
velocity = _walk(delta) + _gravity(delta) + _jump(delta)

View file

@ -96,7 +96,9 @@ surface_material_override/0 = SubResource("StandardMaterial3D_k53q1")
[node name="RayCast3D" type="RayCast3D" parent="Camera"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, -0.0119028, -0.999929, 0, 0.999929, -0.0119028, 0, -0.33609, 0)
target_position = Vector3(0, -5, 0)
target_position = Vector3(0, -7, 0)
collide_with_areas = true
collide_with_bodies = false
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true