This content has been marked as final. Show 2 replies
1 person found this helpful
I'm trying to work out the factor of enlargement (so I can get mouse presses to work correctly).Try using JavaFX 8, I think picking faces should work there as it includes a fully revamped 3D engine.
It's still in development, so expect some glitches initially, but it's already way better than what is in JavaFX 2.2.
It's likely a lot easier to adopt the picking mechanism implemented in JavaFX 8, then develop your own for JavaFX 2.2.
Though . . .
However for some reason in my old code, I'm using the factor f = d / (d + z - 100), and I have no clue why its 100, but it seems to work perfectly.If it ain't broke don't fix it ;-)
Sorry, little too tired to work through the math right now.
Thanks, I just tried it using d/(d+z), which basically puts the 'xy-screen' at z=0 exactly...
And it appears to be work perfectly with my new program, I'm not sure where that -100 was from in old program though