Questions tagged [ray-picking]
56 questions
0
votes
1 answer
Unprojecting Screen coords to world in OpenGL es 2.0
Long time listener, first time caller.
So I have been playing around with the Android NDK and I'm at a point where I want to Unproject a tap to world coordinates but I can't make it work.
The problem is the x and y values for both the near and far…

BlondesDoingMath
- 3
- 1
0
votes
1 answer
Detecting objects near cursor to snap to - any alternatives to picking ray?
In the problem of detecting objects near the mouse cursor to snap to (in a 3d view), we are using the picking ray method (which basically forms a 3d region of the cursor's immediate neighborhood and then detects objects present in the region).
I…

Alex Bausk
- 690
- 5
- 29
0
votes
1 answer
opengl glkit color-picking glreadpixels always returns zero colored pixels (0,0,0)
The following code can be a complete template for color-picking with glkit. I just need to understand why all the pixels in the offscreen buffer are colored (0,0,0) as printed below to the nslog.
Note: the vertices array is defined in an header file…

user2492853
- 1
- 3
0
votes
2 answers
opengl iOS glkit color picking
Its about picking a 3d object using color-picking. I draw my mesh (update: Which resides in a static header file and is displayed fine to the screen in the same project) to a new offscreen framebuffer and then I use glReadPixels to identify if the…

user2492853
- 1
- 3
0
votes
1 answer
Android Open Gl Object Selection
In open GL there is a term called picking. Which is used to determine which object on the screen was selected. Can someone explain to me what the difference between using picking and putting a touch based listener in each and every instance of a…

Rafiq Flucas
- 111
- 1
- 8
0
votes
1 answer
Ray picking mess
I am using ray picking to find the boundaries for a character. It's not optimal, but it's the best I can do and will have to do; I need to have (close to) pixelperfect collisions and also I have lots and lots of objects.
I do not however get the…

RobotRock
- 4,211
- 6
- 46
- 86
0
votes
1 answer
Picking Ray is inaccurate
I'm trying to implement a picking ray via instructions from this website.
Right now I basically only want to be able to click on the ground to order my little figure to walk towards this point.
Since my ground plane is flat , non-rotated and…

s3rius
- 1,442
- 1
- 14
- 26
0
votes
1 answer
In Three.js Picking Ray, How Objects moves only X,Z? not Y
now Objects move every direction.
but I want to Objects move only X or Z, not Y.
I try this. but result is not good.
on MouseMove
// OBJECT SELECTED
if ( SELECTED )
{
var intersects = ray.intersectObject( PICKING_PLANE…

user1658740
- 75
- 2
- 5
0
votes
1 answer
how to get colors by glreadpixels?
I am trying to get a color of touch point on the screen in Android. but it shows me only RGB = (0, 0, 0) value. I have searched other sites. it said that i should add some codes below but it didn`t change…

Mungunbat Enkhbayar
- 171
- 2
- 15
-1
votes
1 answer
Getting a ray for raypicking in openGL ES
OK, so I used this code for a ray for opengl ES but I'm getting an error with the
this.P0 = farCoOrds;
this.P1 = nearCoOrds;
at the very end of the code. It says,
Cannot Resolve Symbol
Here is the code:
public class Ray {
public static…

Dakota Miller
- 493
- 1
- 4
- 22
-1
votes
1 answer
Trackball issue with Raypicking
I'm trying to develop a 3D raypicking in my OpenGL scene.
I have a working OBJ loader with a trackball.
char* model_file = NULL; /* name of the obect file */
GLuint model_list = 0; /* display list for object */
GLMmodel* model;…

Gorgo
- 456
- 1
- 7
- 19