I’m bit perplexed. So this example code is what causes problems or is just what the problem looks like?
The code does mostly what I’d expect it to do. I think MovePosition sort of overrides setting velocity directly → Removing MovePosition will stop movement up, otherwise this movement is applied, no matter if you call the MovePosition in Update, LateUpdate or FixedUpdate, MovePosition seems to override setting velocity.zero.
If it would happen inside of Update, it would be no surprise. But a single call to a method containing that code will cause the character to float as well.
The code above shows what the problem looks like. I don’t use that code in 1 method. However, in rare occasions my game will try to apply moveposition and iskinematic to the same character at the same time, which will cause that character to float away forever.
Edit:
So, perhaps an example will help in this case
Suppose the code above is inside a method called “Test()”, and a UI button will perform “Test()” on button click. In this case, clicking the button once will cause the character to float away forever.
I also think that MovePosition does not IMMEDIATELY move the object - it just tells the object how much to move the next time it gets around to moving. Combine this with the bug mentioned in the linked thread, and you have a situation where MovePosition laughs at your attempts to control an object’s velocity manually.