As I delve into detecting collisions between high-velocity balls, an obstacle arises. This issue seems to be quite common due to the nature of fast-moving objects colliding. I suspect that the solution lies within derivatives, and while I've drafted something on my own, I'm hesitant to reinvent the wheel if there exists a tried-and-tested method.
Any insights that can shed light on my journey would be greatly appreciated!
To illustrate this predicament further, consider a simple example: if two balls are traveling at speeds like 1.5 or 3, they interact smoothly. However, when utilizing significantly higher velocities such as 50, failures occur.
<html>
<head>
<title>Collision test</title>
</head>
<body>
<canvas id="canvas"></canvas>
<script>
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
const width = window.innerWidth;
const height = window.innerHeight-4;
const center = { x: width/2, y: height/2 };
...
...
I have also shared this code snippet on JSBin for further exploration and collaboration.