Improved third person camera
This commit is contained in:
@ -9,6 +9,9 @@ static func dampf(from: float, to: float, weight: float, smoothing: float = 0.75
|
||||
static func damp_angle(from: float, to: float, weight: float, smoothing: float = 0.75):
|
||||
return lerp_angle(from, to, 1 - exp(-smoothing * weight))
|
||||
|
||||
static func damp_spherical(from: Vector3, to: Vector3, weight: float, smoothing: float = 0.75):
|
||||
return from.slerp(to, 1 - exp(-smoothing * weight))
|
||||
|
||||
static func from_to_rotation(from: Vector3, to: Vector3) -> Quaternion:
|
||||
var axis := from.cross(to).normalized()
|
||||
var angle := from.angle_to(to)
|
||||
|
Reference in New Issue
Block a user