I have a character that is rigged, and has a few lines of code in it to make it look at the player using the head bone if the player is within a certain area . I dont like how it snaps to the player instantly though. How would I lerp this code?
RangeArea.get_overlapping_bodies():
if body.is_in_group("Player"):
if !interacting:
bone_pose = bone_pose.looking_at(looktarget.global_position)
Skeleton.set_bone_global_pose_override(1, Skeleton.global_transform.affine_inverse()*bone_pose, 1.0, true)```