thedigitalmonkey
03-29-2006, 05:33 AM
I am a beginner to 3d game design, and I am beginning to experiment with a 3d game engine.
Here's what I'm trying to do (basically) I have a 3d scene with a character. The camera will move to follow the character in the scene. Basically I want the user to click on a point on the ground, and have the character walk there.
Now pathfinding is a whole 'nother story, and I'll deal with that next- but- how can I translate the 2d mouse position into a point in 3d space on the ground plane? Conceptually? I haven't even started coding this yet but I'm trying to think out how it would work.
I mean, if it was a flat, 2D game, the X position of the mouse and Y position of the mouse would be the same as that point on the flat floor. But since it's in 3D, I can't think of a way to to translate those and X and Y absolute positions on the screen into a corresponding place on the floor plane.
I'm sorry if that's not clear. (I'm saying I want to do something like Ankh or Out From Boneville, point and click but in a 3D world.)
Thanks ahead of time for helping a 'newb.
Here's what I'm trying to do (basically) I have a 3d scene with a character. The camera will move to follow the character in the scene. Basically I want the user to click on a point on the ground, and have the character walk there.
Now pathfinding is a whole 'nother story, and I'll deal with that next- but- how can I translate the 2d mouse position into a point in 3d space on the ground plane? Conceptually? I haven't even started coding this yet but I'm trying to think out how it would work.
I mean, if it was a flat, 2D game, the X position of the mouse and Y position of the mouse would be the same as that point on the flat floor. But since it's in 3D, I can't think of a way to to translate those and X and Y absolute positions on the screen into a corresponding place on the floor plane.
I'm sorry if that's not clear. (I'm saying I want to do something like Ankh or Out From Boneville, point and click but in a 3D world.)
Thanks ahead of time for helping a 'newb.
