Improved animation performance

This commit is contained in:
2024-02-28 12:15:58 +01:00
parent ded6f51c5d
commit cb4dd41358
9 changed files with 63 additions and 52 deletions

View File

@ -15,8 +15,7 @@ var ik_time: float
func _ready():
if owner != Global.player:
queue_free()
return
set_enabled(false)
for foot_name in feet_names:
var foot = Foot.new()
@ -94,3 +93,7 @@ func get_foot_rotation(old: Basis, normal: Vector3) -> Basis:
new = new.orthonormalized()
new = new.rotated(Vector3.UP, PI)
return new
func set_enabled(enabled: bool):
set_process(enabled)
set_physics_process(enabled)