Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
Object3D translate problem
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Object3D translate problem (Read 2589 times)
Dharmaraj
byte
Posts: 2
Object3D translate problem
«
on:
September 23, 2013, 01:04:42 pm »
how can i translate the object3D in jCPT-AE when i click on any position of mobile screen. go to the that position where i clicked in screen.
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: Object3D translate problem
«
Reply #1 on:
September 23, 2013, 08:16:03 pm »
You have to convert the 2d screen coordinate into a 3d world space coordinate and move the object to that position. For example by using this method:
http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Interact2D.html#reproject2D3DWS(com.threed.jpct.Camera, com.threed.jpct.FrameBuffer, int, int, float)
.
Keep in mind that a conversion from 2d to 3d requires one fixed coordinate in 3d, which is usually z. That's why the method takes a z coordinate in 3d in addition to the screen coordinates.
Logged
Dharmaraj
byte
Posts: 2
Re: Object3D translate problem
«
Reply #2 on:
September 24, 2013, 11:30:11 am »
thank you so much.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
Object3D translate problem