S
S
Sneiksus2021-05-09 20:32:40
JavaScript
Sneiksus, 2021-05-09 20:32:40

Colision detection in canvas between moving objects?

There is an array of objects which has properties xy dx dy. They are drawn on the canvas and move by adding dx/y to x/y (or -dx/y if you need to change direction). You need to implement a collision between them so that when they collide they repel each other. What is the best way to do this

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question