collision from 2d position in a plane

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Tr3nT
Posts: 65
Joined: Thu Nov 29, 2007 5:19 pm

collision from 2d position in a plane

Post by Tr3nT »

hi all....
i need to find a vector3df of the intersection from a line(from the camera to the mouse position) but it must be in a plane(for example in the plane Y=0)....
i could make a huge ,flat,cube and use it with intersections and the collision manager....
there is something less complicated????
some function i can't find?
thanks......
Tr3nT
Posts: 65
Joined: Thu Nov 29, 2007 5:19 pm

Re: collision from 2d position in a plane

Post by Tr3nT »

sorry for the up....
there is no one that can help me with this????
blAaarg
Posts: 94
Joined: Tue Mar 02, 2010 9:11 pm
Location: SoCal

Post by blAaarg »

Try:

Code: Select all

plane3df planeToIntersectWith(vector3df(0,1,0), distanceFromOrigin);
planeToIntersectWith.getIntersectionWithPlane(ray.start, ray.getVector(), outVector);
sending it the ray you get from ISceneCollisionManager::getRayFromScreenCoordinates()
"Computers don't make mistakes! What they do they do on purpose!!"

-Dale Gribble
Post Reply