Jump to content

Predict Collision


Miroku_87
 Share

Recommended Posts

Hey everybody,

I'm looking for a way to check if a sprites encounters another sprite on a given trajectory BEFORE it evens starts moving.

That's because if the sprite will collide with an another one while moving in that direction I don't even want it to go.

 

Can somebody please explain to me how can I accomplish that?

 

Thank you in advance!

Link to comment
Share on other sites

I imagine something like that in the physics engine should be fairly easy to add? If you know the velocity and size of both objects, you can make an accurate prediction for whether they'll intersect at some point in the future. I guess it'd have to be a simplistic prediction though, as gravity, drag, collisions and so on will all muddy the waters. Maybe gravity and drag can be added to the equation but collisions will make it much more difficult.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...