Search Issue Tracker

Fixed in 5.2.0

Votes

1

Found in

4.3.0f4

Issue ID

576941

Regression

No

SmoothDamp example in the documentation is incorrect

Correct example:
Current SmoothDamp Documentation:
<file://localhost/Applications/Unity/Unity.app/Contents/Documentation/html/en/ScriptReference/Mathf.SmoothDamp.html>

public Transform <Transform.html> target;
public float smoothTime = 0.3F;
private float yVelocity = 0.0F;
void Update() {
float newPosition = Mathf.SmoothDamp
<Mathf.SmoothDamp.html>(transform.position.y, target.position.y, ref
yVelocity, smoothTime);
transform.position = new Vector3
<Vector3.html>(transform.position.x, newPosition,
transform.position.z);
}

(also full script attached in a user response)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.