0
mouse capture in viewport
This discussion was imported from CodePlex
alexalthauser wrote at 2013-04-03 23:43:
Hello,
I'm trying to show the x,y,z position of the mouse within the helix3d viewport. I was wondering if there are any examples or samples, that show how to do this?
I'm building a 3D level editor, with a 3D grid, used for positioning objects. When the mouse moves through the grid, I want transparent planes to light up each side of the cube which the mouse is over, within the grid.
So far I have the X & Y mouse coordinates of the HelixViewport3D. I forget how to get the z coords. It's Camera lookat direction multiplied by something.. Arg, can't remember. Help!
Thanks,
Alex
I'm trying to show the x,y,z position of the mouse within the helix3d viewport. I was wondering if there are any examples or samples, that show how to do this?
I'm building a 3D level editor, with a 3D grid, used for positioning objects. When the mouse moves through the grid, I want transparent planes to light up each side of the cube which the mouse is over, within the grid.
So far I have the X & Y mouse coordinates of the HelixViewport3D. I forget how to get the z coords. It's Camera lookat direction multiplied by something.. Arg, can't remember. Help!
Thanks,
Alex
objo wrote at 2013-04-15 12:22:
See the
Or use the
See also the "VoxelDemo" in the "ExampleBrowser".
CurrentPosition
property in the HelixViewport3D
control.
Or use the
Viewport3DHelper.Point2DToRay3D
function. You can then find the intersection of the
Ray3D
and a Plane3D
. See also the "VoxelDemo" in the "ExampleBrowser".
Customer support service by UserEcho