Questions tagged [mouse-picking]
77 questions
13
votes
3 answers
How do I find my mouse point in a scene using SceneKit?
I have set up a scene in SceneKit and have issued a hit-test to select an item. However, I want to be able to move that item along a plane in my scene. I continue to receive mouse drag events, but don't know how to transform those 2D coordinates…

Michael Bishop
- 4,240
- 3
- 37
- 41
9
votes
1 answer
Object picking with ray casting
I've been having a problem with inaccuracies in my ray casting algorithm for detecting mouse hits within a box. I'm completely at a loss as to how to fix this properly and it's been bugging me for weeks.
The problem is easiest described with a…

sler
- 974
- 1
- 11
- 19
9
votes
3 answers
Selecting 3D surfaces with a selection box (in two different ways)
I am creating a piece of modelling software. My models are all made up of flat polygons, which are simply an ordered set of vertices that I am displaying with OpenGL. I've done quite a bit of searching and to my surprise haven't found much…

sschilli
- 2,021
- 1
- 13
- 33
7
votes
1 answer
OpenGL get 3D coordinates of nearest world 3D point to the current mouse Location
in an OpenGL context, I have seen it is possible to convert mouse coordinates to 3D world coordinates (e.g. MFC with Opengl get 3d coordinate from 2d coordinate of mouse). However, this does not work when I have simply a set of GLPoints and lots of…

manatttta
- 3,054
- 4
- 34
- 72
6
votes
3 answers
OpenGL ES (iPhone) Touch Picking
Looking to do classic OpenGL mouse picking in ES. I'd prefer not to use third party libs, GLU ports and OpenGL name stacks, etc, are out. This pretty much leaves inverse view transformation and ray intersection, correct?
I've gotten pretty far…

jbg
- 993
- 1
- 11
- 19
5
votes
1 answer
Ray Sphere Intersections in OpenGL
I'm trying to use ray-sphere intersections to perform mouse picking in OpenGL. I found a few formulae online, and the last one I tried was one suggested by a user on Stack Exchange:
Ray-Sphere intersection
From what I've understood of this answer,…

eihe
- 51
- 6
5
votes
1 answer
How to do picking in modern OpenGL without gluUnProject?
How do you convert screen coordinates to world coordinates in modern OpenGL without the use of gluUnProject?

manabreak
- 5,415
- 7
- 39
- 96
4
votes
1 answer
Cesium: picking entity and retrieving info of WMS
I have developed a 3D viewer of buildings. What I'm trying to add now is the selection of the content of a WMS (Web Map Service) below the building entities.
Basically, I want to be able to select the building at the position were the user left…

Wout
- 103
- 1
- 3
- 6
3
votes
2 answers
Which mouse picking strategy for milions of primitives?
I am rendering models based on milions (up to ten) of triangles using VBOs and I need to detect which of these triangles the user may click on.
I try to read and understand how the "name stack" and the "unique-color" work.
I found that the name…

elect
- 6,765
- 10
- 53
- 119
3
votes
2 answers
How pick geometries in OpenGL with multisample framebuffer?
(Edit) I made working geometry picking with framebuffer. My goal is draw huge scene in one draw call, but I need to draw to multisample color texture attachment (GL_COLOR_ATTACHMENT0) and draw to (eddited) non-multisample picking texture attachment…

eSeverus
- 552
- 1
- 6
- 18
3
votes
1 answer
How to implement translation & rotation widgets for game level editor
I am developing game editor.To detect mouse hit on 3D model I am using mouse picking concept.
But I want to implement translation & rotation widgets like other game editor with actual arrows at the center of model in three direction.
How to achieve…

Rushikesh Talokar
- 1,515
- 4
- 16
- 32
3
votes
1 answer
How to convert mouse coordinate on screen to 3D coordinate
I'm creating a 3D application using GLUT in C++.
Now, I want to implement a method similar to this:
Vector3* MyClass::get3DObjectfromMouse(int mouseX, int mouseY);
How can I implement this method?

user1956702
- 85
- 1
- 8
3
votes
1 answer
GLSL - fragment shader - each triangle with distinct color
I want to write a shader program which will render each triangle of the mesh in distinct color (so I could pick one triangle). I tried to use gl_PrimitiveID, but it always returns 0, for example:
#version 330
out uvec3 FragColor;
void main()
{
…

user1784182
- 31
- 3
2
votes
1 answer
How do I setup and use a persistent framebuffer object for doing unique color selection?
This question changed a lot since it was first asked because I didn't understand how little I knew about what I was asking. And one issue, regarding resizing, was clouding my ability to understand the larger issue of creating and using the…

BentFX
- 2,746
- 5
- 25
- 30
2
votes
1 answer
ThreeJs Badly sees the coordination of the mouse through the canvas
Structure of my project 66% threejs model, 44% html (side control) using Bootstrap.
I’m trying to make mouse picker, when pointing at an object so that it is shown on which object it is pointed. As I understand it, he sees the coordination of the…

Arthur
- 385
- 3
- 13