Moving Point and Moving Rectangle Intersection

Started by
0 comments, last by Zakwayda 14 years, 11 months ago
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.
Checkout my Journal ( Just started ) for info on my game development status: http://www.gamedev.net/blog/965-ninja-gd/
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.

This topic is closed to new replies.

Advertisement