![]() If we are also not shaking at the time, we turn the script off completely. If we are, then we snap to the position and let the script know that we are done moving. Then we determine if we are close enough to our desired position or not. We set the maxDistanceDelta to ltaTime * _currentMoveSpeed, so we maintain our desired speed no matter how long the frame takes to render. If we are moving, we call MoveTowards() to get closer to our destination. ![]() Only then do we run our respective logic. ![]() The first thing it does is determine if we are moving or shaking, or both. ![]()
0 Comments
Leave a Reply. |