Plan intersect a ray

alphamax

24-12-2006 12:35:17

Hi everybody, i want to expose my problem.

I want to create an editor that can be able to paint on a mesh. Basicly it must be able to paint on a plan or a terrain mesh.

I want to know if, with the mouse (i know how to obtain the ray) i can see a colision with a plan and where exactly (coordinates) but i also want to know if i can know the 4 vertex near the colide.

For exemple
A.........B
----------
|.X.......|
|..........|
----------
C.........D

X is the collision on the mesh. Can i extract the information of the UV at the X position and can i know the position of X : 1/2 A + 1/4 C + 1/8 B + 1/8 D for exemple.

Hope you have understand >< :oops:

Thanks for reading.

stoneCold.net

24-12-2006 17:04:53

for such simple collision tasks you should use a collision detection library like opcode
(a full blown physics engine is overkill for the task, because it's job is simulating physical behaviour of objects, and not just collision detection) :wink:
----> http://ogreconglo.sourceforge.net/phpBB2/viewforum.php?f=2&sid=2859321615aebb2c857f10202a2dc22f

greetings