Implemented physics interpolation
This commit is contained in:
client
Global.gdMain.tscn
enemy/death
item/soul
math
player
Character.gdCharacterComponent.gdPlayer.gdPlayer.tscn
animation
controller
movement
performance
rotation
skills
state
skill/dash
ui
world
stresstest
@ -1,17 +1,20 @@
|
||||
class_name Math
|
||||
|
||||
static func damp(from: Variant, to: Variant, weight: float):
|
||||
static func damp(from: Variant, to: Variant, weight: float) -> Variant:
|
||||
return lerp(from, to, 1 - exp(-weight))
|
||||
|
||||
static func dampf(from: float, to: float, weight: float):
|
||||
static func dampf(from: float, to: float, weight: float) -> float:
|
||||
return lerpf(from, to, 1 - exp(-weight))
|
||||
|
||||
static func damp_angle(from: float, to: float, weight: float):
|
||||
static func damp_angle(from: float, to: float, weight: float) -> float:
|
||||
return lerp_angle(from, to, 1 - exp(-weight))
|
||||
|
||||
static func damp_spherical(from: Vector3, to: Vector3, weight: float):
|
||||
static func damp_spherical(from: Vector3, to: Vector3, weight: float) -> Vector3:
|
||||
return from.slerp(to, 1 - exp(-weight))
|
||||
|
||||
static func damp_vector(from: Vector3, to: Vector3, weight: float) -> Vector3:
|
||||
return from.lerp(to, 1 - exp(-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