Bug? UltimateCharacterLocomotion.AddForce seems Frame Rate dependent

Arlo

Member
When adding a force via UltimateCharacterLocomotion.AddForce the result is unpredictable, as it sometimes moves the character twice as fast / at halve speed. The function itself is asking for how many frames it should apply the force, and for continuous forces like treadmills or air currents (applying force each frame) that won't work because it becomes frame rate dependent (the character will be pushed faster at higher frame rates and vice versa)

- UCC 3.3.3p1
- Unity 6.0.60
- UltimateCharacterLocomotion.AddForce seems Frame Rate dependent
- Apply a force to the player via UltimateCharacterLocomotion.AddForce, then use Application.targetFrameRate to set the frame rate to 30, 60, 120
- No error message
 
AddForce is dependent on the amount the controller is ticked. Are you changing the fixed update rate? The controller is moved within FixedUpdate and interpolated within Update. The force is not used within the regular Update loop.
 
I'm sending a characterLocomotion.AddForce per frame via Update (while inside an Air Current for instance). If I divide the force applied by the Application.targetFrameRate it gets predictable, otherwise the Player moves at different speeds depending on Frame Rate (ie Editor vs Build on high end PC vs Mobile...)
That's:
- Update: characterLocomotion.AddForce(force) = speed changing based on frame rate
- Update: characterLocomotion.AddForce(force/Application.targetFrameRate) = speed stable even at different frame rates
 
Back
Top