Quantcast
Channel: Answers by "TomPendergrass"
Viewing all articles
Browse latest Browse all 45

Answer by TomPendergrass

$
0
0
A better answer is to use ClampMagnitude. Normalizing your movement vector will always restrict it to a magnitude of 1 (or zero if the vector's magnitude is too small). ClampMagnitude on the other hand will leave your magnitude alone unless it exceeds a your maxLength value. Since you're multiplying by speed, you will want to clamp to the maxLength of 1.

Viewing all articles
Browse latest Browse all 45

Latest Images

Trending Articles





Latest Images