If a sprite has multiple joints, running removeAll() doesn't actually remove all of them.
I suspect the reason why this happens is because the function runs joint.remove() on each of the joints in the sprite.joints array with a for/of loop, but since this removes them from the array immediately, the positions in the array are shifted and thus the loop skips some joints.
If a sprite has multiple joints, running
removeAll()
doesn't actually remove all of them.I suspect the reason why this happens is because the function runs
joint.remove()
on each of the joints in thesprite.joints
array with a for/of loop, but since this removes them from the array immediately, the positions in the array are shifted and thus the loop skips some joints.