• Advertisement
Sign in to follow this  

Moving Point and Moving Rectangle Intersection

This topic is 3249 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just a simple question can someone hook me up with a thread/web site link or something , showing how to sweep test against a moving point and a moving rectangle, and find where the point intersects the rectangle, if it does at all.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by GMaker0507
Just a simple question

can someone hook me up with a thread/web site link or something , showing how to sweep test against a moving point and a moving rectangle, and find where the point intersects the rectangle, if it does at all.
In general, when testing for intersection between two moving objects you can express the problem so that one of the objects is moving and the other is static (to do this, subtract the velocity of the object that you want to consider static from the velocities of both objects).

In the case of a moving point and a moving rectangle, this leaves you with a raytracing problem, with the target object being an oriented or axis-aligned rectangle (depending on what you're using). These tests are well documented, and are discussed on the forums fairly frequently. Try searching the archives for (e.g.) 'ray aabb intersection', 'ray obb intersection', 'ray box intersection', and so on. If you have further questions or have trouble finding relevant references, post back here and someone will most likely be able to help.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement