コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】Mathf.SmoothDamp で Time.timeScale を無視する方法

概要

var result = Mathf.SmoothDamp
(
    current: current,
    target: target,
    currentVelocity: ref currentVelocity,
    smoothTime: smoothTime,
    maxSpeed: maxSpeed,
    deltaTime: Time.unscaledDeltaTime // ★
);

Mathf.SmoothDamp の第6引数に Time.unscaledDeltaTime を渡すことで
Mathf.SmoothDamp で Time.timeScale を無視できます

参考サイト様