Coroutines and while loop

前端 未结 3 1518
说谎
说谎 2021-01-27 06:51

I have been working on a object movement along a path Which i have been geting from Navmesh Unity3d I am using coroutine in which i controled it with while loop as i can show

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-27 07:14

    Maybe you could multiply the velocity by, say, 0.95f. This will make it accelerate, then stay at a constant speed, and then when you want it to stop it will gradually decelerate. Increasing the 0.95f will cause it to accelerate/decelerate faster.

提交回复
热议问题