Hi,
You can make usage of the everpano raycaster for your own implementations.
The navigator plugin provides those 2 public functions to get information about 3D positions of your model
plugin[navigator].ev_mousetomesh
plugin[navigator].ev_raytomesh
** Of course a requirement is that the project is done using
everpano 3D, it won't be valid otherwise.
ev_mousetomesh : transform the mouse position into a 3d position of the mesh
ev_raytomesh : transform a ray which has origin vector and direction vector into a 3d position of the mesh
Demo of usage :
<events name="everpano_raycaster" keep="true"
onclick="plugin[navigator].ev_mousetomesh(get(mouse.x),get(mouse.y),my_d,my_x,my_y,my_z,my_nx,my_ny,my_nz,my_rx,my_ry,my_rz);
debug('distance : ',my_d);
debug('position');
debug('x : ',my_x);
debug('y : ',my_y);
debug('z : ',my_z);
debug('normals');
debug('nx : ',my_nx);
debug('ny : ',my_ny);
debug('nz : ',my_nz);
debug('rotation');
debug('rx : ',my_rx);
debug('ry : ',my_ry);
debug('rz : ',my_rz);
"
/>
the
ev_raytomesh is expecting an origin position vector XYZ and a direction vector XYZ
plugin[navigator].ev_raytomesh(ox,oy,oz,dx,dy,dz,my_d,my_x,my_y,my_z,my_nx,my_ny,my_nz,my_rx,my_ry,my_rz);
If the ray that we generated intersects with the mesh we are going to get the same values as above saved in the variables name that we provided.
Happy coding
Kind regards