ani fixed

This commit is contained in:
Nicholas Butzke
2026-08-10 12:17:59 -04:00
parent 9358746582
commit 833e936bcd
10 changed files with 554 additions and 23 deletions
+9
View File
@@ -89,6 +89,8 @@ var synced_position: Vector3 = Vector3.ZERO
var synced_velocity: Vector3 = Vector3.ZERO
var synced_is_ads: bool = false
var synced_wall_side: float = 0.0 # -1 wall left, +1 wall right (wall-glide bank)
var synced_wall_normal: Vector3 = Vector3.ZERO
var synced_wall_contact_point: Vector3 = Vector3.ZERO
var synced_helmet_closed: bool = false
var synced_is_dancing: bool = false # dance emote (B), shown on the model
## Which of the five routines in DanceRoutines is playing. Replicated, so other
@@ -1071,6 +1073,8 @@ func _physics_process(_delta: float) -> void:
# otherwise the first movement frame still samples last frame's Idle.
if visual.has_method("set_wall_side"):
visual.set_wall_side(sm.wall_side)
if visual.has_method("set_wall_surface"):
visual.set_wall_surface(sm.wall_normal, sm.wall_contact_point)
if visual.has_method("set_wall_glide_motion"):
visual.set_wall_glide_motion(velocity)
elif visual.has_method("set_wall_run_motion"):
@@ -1089,6 +1093,8 @@ func _physics_process(_delta: float) -> void:
synced_movement_speed = Vector2(velocity.x, velocity.z).length()
synced_is_crouching = sm.input_crouch
synced_wall_side = sm.wall_side
synced_wall_normal = sm.wall_normal
synced_wall_contact_point = sm.wall_contact_point
synced_position = position
synced_velocity = velocity
@@ -1167,6 +1173,9 @@ func _process(delta: float) -> void:
visual.set_locomotion(d.x, d.y, 1.0 if synced_is_ads else 0.0)
if visual.has_method("set_wall_side"):
visual.set_wall_side(synced_wall_side)
if visual.has_method("set_wall_surface"):
visual.set_wall_surface(
synced_wall_normal, synced_wall_contact_point)
if visual.has_method("set_wall_glide_motion"):
visual.set_wall_glide_motion(synced_velocity)
elif visual.has_method("set_wall_run_motion"):