I was playing around with com.jme.test.intersection.TestPick today, and I noticed some rather odd behaviour. The picking itself seems to work fine, and so does the drawing of the lines, but I find that the lines occasionally get culled when they should still be visible. For example, spearing the box with ~10 lines and then looking up their length, about 3/4 of the way up they get culled, which is obviously not right. I’d have fixed it myself if I knew how, but my knowledge of the culling system is cursory at best. I can post a screenshot if you’re interested and if you think it’d help.
Oh, that’s because when I am putting lines into the scene, I’m not updating the bounding volumes. So, this is actually an application issue rather than a jME issue. I just wanted to quickly show something, so didn’t worry about updating the model bounds of the line node.
Ah. Well, that makes sense.
I was still playing around with it, trying to implement the functionality myself. I’m kinda stuck. Unfortunately, I’m not exactly sure what I should be doing. Any combination of Line.updateModelBound and Line.updateWorldBound don’t seem to do what I want. I’m sure there’s a “right” way to do this, I’m just not exactly sure what!
Thanks.
I’ll play with TestPick and see if I can get culling for the lines working correctly.
Great! Thanks. It’s so nice to have my very own living tutorial!
Well, Eric, there definately appears to be something strange going on with the lines. Checking into it.