feat: implement modular movement state machine and ground, air, and wall climb states
This commit is contained in:
@@ -132,7 +132,7 @@ func update(delta: float) -> void:
|
||||
var looking_towards := look_dir.dot(-fwd_wall.normal) > 0.0
|
||||
var moving_towards := wish_dir.dot(-fwd_wall.normal) > cos(deg_to_rad(params.wall_climb_max_angle))
|
||||
|
||||
if looking_towards and moving_towards:
|
||||
if looking_towards and moving_towards and machine.can_wall_climb:
|
||||
machine.wall_normal = fwd_wall.normal
|
||||
machine.switch_to("wall_climb")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user