Slow PhysicsSystem::applyQueuedMovement for large multiplication of queue size and number of steps
When mMovementQueue
has 20 elements and numSteps
calculated to be maxAllowedSteps
, then total 400 steps should be performed. I got situatons with 240 (20 queue size and 12 steps) calls and it took 50ms. Totally that frame took 54ms which is ~18 fps. It's noticable. My suggestion is to make limit maxAllowedSteps
depdending on mMovementQueue
size. Usually only 1 or 2 steps are performed.
Edited by elsid