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

Translating an Object3D to the touch point

<< < (2/3) > >>

raft:
well, i don't know then ??? Egon should hopefully help..

EgonOlsen:
The coordinates look as if you've not moved the camera at all, which is why they look like camera space. That method projects the 2D coordinate to a 3D point on the view plane, i.e. on z=1 in camera space. This point will then be transformed into world space. If the camera hasn't moved, both spaces are equal.
However, it's unlikely that you want to move in view plane.
Like i did in the other thread that is currently dealing with this issue, i'll link to a recent thread for desktop jPCT that offers a little example at the bottom of the thread: http://www.jpct.net/forum2/index.php/topic,2413.0.html
The basic idea is to calculate the position in world space on a given plane (in world space, not in camera space) based on the result from reproject2D3DWS. You can do it that way or by doing a collision detection based on this vector. I'm mentioning that in the thread too.
Hope this helps.

Babu:
Thanks a lot, Egon.  Your code in that thread works perfect!!  :D

I am attaching the working Android code...

[attachment deleted by admin]

gourabf9systems:
Can anyone post , working example of this topic. that solved by anyone.

EgonOlsen:

--- Quote from: gourabf9systems on March 05, 2013, 11:57:33 am ---Can anyone post , working example of this topic. that solved by anyone.

--- End quote ---
The post right above yours has a working Activity attached.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version