Alright here is what I am trying to do.
I have a camera that stays above and looks down at the character (Think Diable and RTS games). The angle of the camera does not change. So what I want is when I click somewhere on the ground mesh the character will walk there. From the colisition example it uses the direction the camera is facing. This will not work I need where the mous is clicking. If someone can show me how to get the coords in 3D space where the mouse clicked on the mesh then I think I can get the character to walk there.
Thanks
A question on how to move a character.
im not great coder
Hey, i dont really know much about this stuff...but all i can say is how i would work through it pseudo-like:
-on mouse click, record coord's
-set path for character to new coord's
for setting the character's path, i think you would have to do some kind of geometry stuff, with slope or something. again, im not a great coder, but just trying to help.
-on mouse click, record coord's
-set path for character to new coord's
for setting the character's path, i think you would have to do some kind of geometry stuff, with slope or something. again, im not a great coder, but just trying to help.
Thx for the Help but I know that part
Thx for the Help but I know that part
What I was looking for was how to turn the screen cords into the point where the first poly hits at that screen coord.
Thx
What I was looking for was how to turn the screen cords into the point where the first poly hits at that screen coord.
Thx
first you must make a trinalge selector for your mesh
then, using the ISceneCollisionManager interface (obtainable from ISceneManager) you can get a ray from the mouse position. You can then use ISceneCollisionManager::getCollisionPoint (i think that's the name of the function) and pass it your triangle selector. This function will tell you where on the mesh the ray hits.
then, using the ISceneCollisionManager interface (obtainable from ISceneManager) you can get a ray from the mouse position. You can then use ISceneCollisionManager::getCollisionPoint (i think that's the name of the function) and pass it your triangle selector. This function will tell you where on the mesh the ray hits.
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
getRayFromScreenCoordinates
Thanks
After some huntingI found this handy function
getRayFromScreenCoordinates
ThX to all
After some huntingI found this handy function
getRayFromScreenCoordinates
ThX to all