Is anyway to pick a line, circle, ... (simple primitives) in IRR?
=======
My current solution will be:
getScreenCoordinatesFrom3DPosition (line points) -> 2d points and check against the mouse x, y!
Is anyway to pick a line, circle, ... in IRR?
-
- Posts: 101
- Joined: Wed Feb 15, 2006 4:22 pm
- Location: RO
you're thinking in 2d. there is no circle in 3d space, only a cone/tube thing that extends out of camera's view.
for a point on the screen, see this-
http://irrforge.org/index.php/Mouse_Inp ... _on_a_mesh
for a 2d line you would need to make two triangles and see where they intersect with the bounding boxes of your objects, or you could use the collision manager to find the collision between all triangles.
for a circle, hmm. I dunno. I'd probably project bounding box lines to 2d and do a circle/line intersection because its easy.
for a point on the screen, see this-
http://irrforge.org/index.php/Mouse_Inp ... _on_a_mesh
for a 2d line you would need to make two triangles and see where they intersect with the bounding boxes of your objects, or you could use the collision manager to find the collision between all triangles.
for a circle, hmm. I dunno. I'd probably project bounding box lines to 2d and do a circle/line intersection because its easy.
-
- Posts: 101
- Joined: Wed Feb 15, 2006 4:22 pm
- Location: RO