#Unity / #Unity3d folks - I'm trying to make a character controller script that is physics-based and uses Force to move the player rather than root motion or setting velocity. My approach right now is to calculate the difference between the current velocity and the target and 1/
...apply a force equal to that vector (divided by deltaTime and some acceleration rate etc.). The problem I'm getting is that, because Force is a delayed reaction and not immediate like setting velocity to exactly what I want, I'm seeing a jitter... 2/
because the script will apply too much force one frame, then realize the character is going faster than the target velocity and apply a negative force the next frame, creating a speed-up / slow-down on alternating frames. There's also mass & drag that factor into things but 3/
...I can adjust those values as needed. I guess I'm wondering if there is another approach to using Force to move a player around? I'm starting to feel like I'm approaching it wrong and shouldn't be doing it the same way I would if I were just interpolating position/velocity. 4/
Never mind. The solution was to set "Interpolate" to "Interpolate".

Now to google what that does.
Turns out I am a dingus and it had nothing to do with force. I just forgot to press the “Make It Work” button.

Leaving this thread up as a monument to my dingusness.
You can follow @EvanGraphicsGuy.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: