So I'm experimenting with a ray – attempting to detect when one model (call it Model A) ceases to be above another (Model B). I am casting a vertical ray (I think) from A and can detect when that ray intersects with B; however, when A ceases to be above B the findpick still reports that the ray from A is intersecting with B (and strangely, the location of A reports that its still above B no matter how far I take it from B). It's very confusing, but I think that I can figure out what's happening if I could see what this ray is actually doing. So, my question is:
How does one go about drawing a line that exactly mimics a ray that has been cast?
I feel silly now.
Something like this can be used:
Vector3f[] vertices = new Vector3f[2];
vertices[0] = new Vector3f(-61f, 6.5f, 981f); // start point; ray's origin
vertices[1] = new Vector3f(0f,-1f,0f); // end point; ray's direction using additional line segments if necessary
locLine = new com.jme.scene.Line("newline", vertices, null, null, null);
locLine.getBatch(0).getDefaultColor().set(ColorRGBA.magenta.clone());
scene.attachChild(locLine);