Skip to content

格式

typescript
Mathf.SmoothDamp(source, target, velocity, smooth_time, max_speed, delta_time)

所属类: Mathf

描述

实现平滑的过渡效果。

参数

参数名类型描述
sourcenumber当前值
targetnumber目标值
velocitynumber当前速度
smooth_timenumber平滑时间
max_speednumber最大速度
delta_timenumber时间步长

返回值

类型描述
number平滑过渡后的新位置

代码示例