Forums > Jitter

What are jit.pwindow's pickray's values supposed to represent ?

March 28, 2014 | 10:14 am

Hello,

I have a jit.pwindow displaying an Open GL 3D scene.

Using the "pickray" attribute, I get "pickray" messages with six values when mousing over the window.

What do each of these values represent ? The documentation explains the attribute is for ray picking but that’s all.

I thought some of them would represent the position of the closest point under the mouse in world coordinates but it doesn’t seem to match what I see in the jit.pwindow.

Thank you in advance.


March 28, 2014 | 11:17 am

yeah the documentation on this is quite … thin.

this functionality is better explained in the phys.world documentation for the screenraytest message:

The ray start point is taken by converting the screen coords to world-space, and the end point is generated by casting a ray from the camera position, through the start point to the camera far clip plane.

so the 6 values represent world-space positions of the start point and end point of this ray.

the ray can be used for things such as bounding box intersection tests, or whatever you may need it for.


Viewing 2 posts - 1 through 2 (of 2 total)