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
»
How to get the normal vector by touching the screen?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: How to get the normal vector by touching the screen? (Read 1788 times)
Zhangzqs
byte
Posts: 2
How to get the normal vector by touching the screen?
«
on:
July 16, 2018, 08:56:36 am »
I clicked on the screen and calcMinDistanceAndObject3D can determine which 3d object I clicked on, but how do I determine the polygon data I clicked? How to find the coordinates and normal vectors of the clicked polygon.
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: How to get the normal vector by touching the screen?
«
Reply #1 on:
July 16, 2018, 11:17:39 am »
You can attach a CollisionListener to the object (
http://www.jpct.net/doc/com/threed/jpct/CollisionListener.html
), make it return true in its requiresPolygonIDs() implementation and use the data returned by the collision event in combination with the
http://www.jpct.net/doc/com/threed/jpct/PolygonManager.html
. That should give you the desired data.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
How to get the normal vector by touching the screen?