rapier icon indicating copy to clipboard operation
rapier copied to clipboard

KinematicCharacterController: early break in move_shape in case of no update.

Open PieroV opened this issue 3 years ago • 1 comments

Hi! I think the while in move_shape could be early-broken if no improvement is done in an iteration: if I understand correctly, if the character has not moved in an iteration, it will not in the next one, too. However, all the collision queries will be run, consuming time. But I am not sure this makes sense, since kinematic_friction_translation is also updated during iterations.

PieroV avatar Dec 04 '22 20:12 PieroV

@sebcrozet hi, you asked me to send a simple example of the problem that patch should solve on Discord, so here it is :slightly_smiling_face: : simpletest.zip.

Please notice also that I would expect grounded to become true eventually, but it does not (both with and without my patch). Maybe I can open an issue for that, unless I found a way to solve the problem.

PieroV avatar Dec 11 '22 14:12 PieroV