Skip to main content
Post Closed as "Duplicate" by concept3d, bummzack, Maximus Minimus, Sean Middleditch, John McDonald
remove request for links
Source Link
Seth Battin
  • 5.5k
  • 3
  • 29
  • 43

Finding roots/zeros Predicting trajectory collisions for collision detection in a video gamemultiple moving objects

For the most simple of 2D games, I have implemented a posteriori collision detection (overlapping rectangles) on the xy Cartesian plane, but am now interested in understanding the basics of a priori collision detection...

On Wikipedia's entry on collision detection, I noticed the reference to Newton’s Method. So, I want to better understand the link between finding zeros of an equation and detecting a posteriori collision.

Let's start with the most obvious case of finding roots of an equation: If you have a projectile's trajectory modeled as a quadratic function, you can find the roots to predict at what time the height will equal zero (or any other constant height, actually, by just rearranging f(x)=C to be f(x)-C=0 and then finding roots of that expression).

So, as I understand, finding the root can tell me the time at which the object will be at any chosen height. More broadly, we basically know the (x,y) location of the object for any given time. But

But how does root finding, in particular, translate to detecting collisions with another object? (The The other object may be stationary, or be moving. If the latter, do you also determine roots/location of this moving object as well? Calculate the (x,y) trajectory of both objects and determine where they will intersect?)

Any links to a basic primer on this topic, with a simple example would also be greatly appreciated.

Finding roots/zeros for collision detection in a video game

For the most simple of 2D games, I have implemented a posteriori collision detection (overlapping rectangles) on the xy Cartesian plane, but am now interested in understanding the basics of a priori collision detection...

On Wikipedia's entry on collision detection, I noticed the reference to Newton’s Method. So, I want to better understand the link between finding zeros of an equation and detecting a posteriori collision.

Let's start with the most obvious case of finding roots of an equation: If you have a projectile's trajectory modeled as a quadratic function, you can find the roots to predict at what time the height will equal zero (or any other constant height, actually, by just rearranging f(x)=C to be f(x)-C=0 and then finding roots of that expression).

So, as I understand, finding the root can tell me the time at which the object will be at any chosen height. More broadly, we basically know the (x,y) location of the object for any given time. But how does root finding, in particular, translate to detecting collisions with another object? (The other object may be stationary, or be moving. If the latter, do you also determine roots/location of this moving object as well? Calculate the (x,y) trajectory of both objects and determine where they will intersect?)

Any links to a basic primer on this topic, with a simple example would also be greatly appreciated.

Predicting trajectory collisions for multiple moving objects

For the most simple of 2D games, I have implemented a posteriori collision detection (overlapping rectangles) on the xy Cartesian plane, but am now interested in understanding the basics of a priori collision detection...

On Wikipedia's entry on collision detection, I noticed the reference to Newton’s Method. So, I want to better understand the link between finding zeros of an equation and detecting a posteriori collision.

Let's start with the most obvious case of finding roots of an equation: If you have a projectile's trajectory modeled as a quadratic function, you can find the roots to predict at what time the height will equal zero (or any other constant height, actually, by just rearranging f(x)=C to be f(x)-C=0 and then finding roots of that expression).

So, as I understand, finding the root can tell me the time at which the object will be at any chosen height. More broadly, we basically know the (x,y) location of the object for any given time.

But how does root finding, in particular, translate to detecting collisions with another object? The other object may be stationary, or be moving. If the latter, do you also determine roots/location of this moving object as well? Calculate the (x,y) trajectory of both objects and determine where they will intersect?

Source Link
JackOfAll
  • 299
  • 2
  • 5

Finding roots/zeros for collision detection in a video game

For the most simple of 2D games, I have implemented a posteriori collision detection (overlapping rectangles) on the xy Cartesian plane, but am now interested in understanding the basics of a priori collision detection...

On Wikipedia's entry on collision detection, I noticed the reference to Newton’s Method. So, I want to better understand the link between finding zeros of an equation and detecting a posteriori collision.

Let's start with the most obvious case of finding roots of an equation: If you have a projectile's trajectory modeled as a quadratic function, you can find the roots to predict at what time the height will equal zero (or any other constant height, actually, by just rearranging f(x)=C to be f(x)-C=0 and then finding roots of that expression).

So, as I understand, finding the root can tell me the time at which the object will be at any chosen height. More broadly, we basically know the (x,y) location of the object for any given time. But how does root finding, in particular, translate to detecting collisions with another object? (The other object may be stationary, or be moving. If the latter, do you also determine roots/location of this moving object as well? Calculate the (x,y) trajectory of both objects and determine where they will intersect?)

Any links to a basic primer on this topic, with a simple example would also be greatly appreciated.