'2014/07/22'에 해당되는 글 1건

  1. 2014.07.22 카메라 부드럽게 움직이는 스크립트

카메라 부드럽게 움직이는 스크립트

|




static float SmoothDamp(float current, float target, float currentVelocity, float smoothTime, float maxSpeed = Mathf.Infinity, float deltaTime = Time.deltaTime);

Parameters

currentThe current position.
targetThe position we are trying to reach.
currentVelocityThe current velocity, this value is modified by the function every time you call it.
smoothTimeApproximately the time it will take to reach the target. A smaller value will reach the target faster.
maxSpeedOptionally allows you to clamp the maximum speed.
deltaTimeThe time since the last call to this function. By default Time.deltaTime.

시간내(smoothTime)에 정해진 목표(target)로 이동한다.(반환값)

이동할때의 속도도 currentVelocity 값으로 알수있다.(ref 로 넘겨줌)

Trackback 0 And Comment 0
prev | 1 | next