jPCT-AE - a 3d engine for Android > Bugs

difficulty targeting a 3D object with release V1.30

(1/4) > >>

jaco robier:
my menus in 3D does not work with the v1.30 release:
the problem is that if you click on a 3D object, the 3D object is not selected. Sometimes it works after 3 clicks ...

I only use these 2 functions:
SimpleVector dir = Interact2D.reproject2D3DWS (cam, fb, Clickx, clicky) .normalize ();
float res=Cube.calcMinDistance(cam.getPosition (), dir);

In v1.28+v1.29 works fine: It's always return res=25 when i click on the 3D object.
in V1.30: it's return res=9.99999995904E11 when i click on the 3D object ?!?

Have you got any ideas?
Cordialy

EgonOlsen:
Only a feeling...are you doing these calculations in the touch event method/thread? If so, don't do this but do it in the render thread instead. jPCT-AE isn't thread safe. If you are doing it in the render thread, I need a test case. I don't have this problem nor do I remember any changes in that part.

jaco robier:
these 2 functions are used in the render thread :
SimpleVector dir = Interact2D.reproject2D3DWS (cam, fb, Clickx, clicky) .normalize ();
float res=Cube.calcMinDistance(cam.getPosition (), dir);

and ClickX and ClickY are calculated in the touch event method/thread.

I checked the first function (Interact2D.reproject2D3DWS (cam, fb, Clickx, clicky) .normalize () by projecting a 3D ball from the click : it's seems correct ...(see picture). http://www.jpct.net/forum2/Smileys/default/huh.gif

EgonOlsen:
Have you tried the calcMinDistance() version that takes an additional max. distance parameter? Set it to something large like 1000 or 10000 and see, if that changes something. If it doesn't, I need a test case. I can't reproduce this problem, everything works fine in my tests.

EgonOlsen:
I checked the code changes regarding ray-polygon stuff and all that happended was that I converted a lot of floats to doubles (but I can't spot any error in those) and that I made a constant smaller (but I don't see, why this should have a negative impact). If you can provide me with a test case, I can revert these changes and see if that chanegs something. But as said: In my tests, all is well.... ???

Navigation

[0] Message Index

[#] Next page

Go to full version