Collision Detection With Ground

I am looking for a way to detect a collision of a ray coming from the camera and a plane representing ground. I already have a ray being created from the camera lens. I also need to get the world coordinates at the point where the ray hits the ground. I see two ways of doing this.

  1. Load a model of a plane into the game and test collision with it. Would I need to test for collision with a bounding box or something similar so that the CollisionEntry knows how to compute the point of intersection?

  2. Fake a plane with code and still know where the ray would hit it in world coordinates.

Any input on how to achieve this would be greatly appreciated.

I have found a possible way to accomplish my task. Guess where I found the answer. On the forums that I was asking the very same question. I should have looked through the forums more thoroughly before posting.

Just in case anyone else runs into the same problem that I have, here is the forum post with a very simple way to implement ray intersection with a plane.

discourse.panda3d.org/viewtopic.php … ight=plane