-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get coordinates from the .obj #12
Comments
Yes it is not so hard. U can wrap to a gesturedetector, and on x and y coordinates u just run your method on the mesh vertices. When the click x y pos is near on a coordinate u can set it to a list. After u just select the one whats z coordinate is the nearest to the camera. Thats all |
@klaszlo8207 I'm not that familiar with gesture detector. An example would be great.Thanks |
here |
@klaszlo8207 works great
@klaszlo8207 works perfectly.assuming one had predetermined points how would one go about it .Thanks. |
Sorry I dont understand what you wrote. What do u want? |
I have an obj file i have all the vertices coordinates in xyz ... how would i go about selecting say a point v -0.777874 0.214472 0.075458. in 2d |
v 0.822220 0.216242 -0.025730 this is a vertex (Vect3) have x,y,z value but when You draw the triangle on a 2D surface it has a value like: 200, 250 (x, y) so First you want to those vertices convert to 2d ints (in this library you can see how the programmer do that) create a new List and XYZ values that is int After you have the gesturedetector touched point, you just loop throug on that list and lets say you select the first one that is nearest to the camera (Z), and nearest to that XY touched value (lets say distance is 5) |
@klaszlo8207 i have been trying to wrap my head about converting the points to 2d and ended up confused.an example would be really helpful.thanks. I'm trying to get a point in a 3d obj and place a Container(color:Colors.red) on the position. Assuming i have a 3d car object I want to be able to select the door and move the select container to other parts within the door. |
is there a way i can get coordinates of a click point from the 3d object
The text was updated successfully, but these errors were encountered: