Suppose I have 2 image spirits which change their position continuously. one on them is controlled by user using joystick. When they collide I have made few blocks to change their direction replicating elastic collision formula. However as user is controlling one of the image sprite the direction do not change , and image spirit overlaps.
How to make a restriction that they always bounce each other and never overlap.
use the CollidedWith method
https://docs.kodular.io/components/drawing-and-animation/image-sprite/#collided-with
or are you talking about the so called Sprite Cannibalism?
When more than one ImageSprite can be dragged on a Canvas, unless precautions are taken beforehand they may get ‘stuck’ together. This is referred to as ImageSprite cannibalism.
see also
Taifun