Using a lerp() to interpolate a look_at() function?

var direction: Vector3 = self.global_position.direction_to(target_position)
var target: Basis = Basis.looking_at(direction)

# if in _process
Player.basis = Player.basis.slerp(target, 0.01)

Though this will be frame-dependent, how important to gameplay functions is this rotation? Is it only for visuals?

1 Like