A method typically used for determining what the user selected.

learn more… | top users | synonyms

1
vote
0answers
39 views

Why does my texture-based object picking detect the wrong object?

I am a LibGDX beginner implementing a RISK-like game. I want to let the player select territories by clicking on them, but for some reason, the wrong territory is sometimes detected. The clicked ...
0
votes
1answer
143 views

3D picking for mouse move event

I implemented color picking recently and I would like to use it as kind of highlight when mouse is over an object but I am concerned about performance. Color picking requires whole frame to be drawn, ...
2
votes
2answers
403 views

How do I get mouse x / y of the world plane in Unity?

I am trying to make a tiled landscape. The terrain itself is not made from tiles but the world has a grid which I define. I would like to place boxes/rectangles which snap to this grid, at runtime, ...
0
votes
2answers
247 views

OpenGL 2.0 - How to swap buffers for color picking

I'm trying to reproduce color picking on iOS, following the technique described here: http://www.lighthouse3d.com/opengl/picking/index.php3?openglway2, with OpenGL ES 2.0. When the user touches the ...
0
votes
0answers
68 views

how to do picking in 2d lwjgl

I searched the whole internet, but I couldn't find something useful. How to do picking (like ray picking) in lwjgl in orthographic mode (2d)? I think this is less confusing than picking in 3d, but I ...
3
votes
1answer
78 views

How can I GL_SELECT from a gluPerspective-transformed scene?

I'm using JOGL to access OpenGL-methods on an old OpenGL version, because of school. I have written a method which is called before any objects are drawn. This method shows which object is picked. ...
1
vote
1answer
200 views

Understanding implementation of glu.PickMatrix() [closed]

I am working on an OpenGL project which requires object selection feature. I use OpenTK framework to do this; however OpenTK doesn't support glu.PickMatrix() method to define the picking region. I ...
1
vote
1answer
78 views

Picking problem with rotated view matrix

I have picking code that works, if my view matrix has no rotation (only translation). Now If I rotate my camera, picking goes to hell. I cant find whats wrong My code: ...
0
votes
0answers
223 views

LWJGL Mouse picking when camera rotated

I have third person camera in my game and I have mouse picking which works not so good. It works good only when yaw rotation is lesser than ~75 if yaw is greater than 75 then it fails.. Here is video ...
2
votes
1answer
601 views

How to tell what part of a 3D cube was touched

I am writing a rather simple android game and I am implementing Open GL to draw a 3D cube that spins upon the X, Y and Z axis and I need to know where the user has clicked on the texture of the cube. ...
0
votes
0answers
339 views

Convert OpenGL code to DirectX

First of all, this is kind of a follow up question on @byte56 excellent anwser on this question concerning picking algorithms. I'm trying to convert one of his code examples to directX 11 however I ...
0
votes
1answer
392 views

How can I remove the view and projection matrix from ray position to get only the ray model?

I've got a little problem with my picking module and I need your help. I have a method to project a ray from the camera to a fixed point when I click somewhere. The computed ray looks good, it go to ...
2
votes
1answer
139 views

Manual GLU.gluUnproject

Before I used GLU.gluUnproject to calculate my picking ray in my OpenGL game. Recently I switched to my own calculated matrices, and now I can forget the gluUnproject. How can I calculate the picking ...
2
votes
1answer
878 views

libgdx collision/picking

I am trying to make something with java libgdx (2D). One thing that I can't figure it out is how to check mouse intersection with (fore example) isometric textures that are not rectangle shaped ...
4
votes
1answer
774 views

Picking 3D with OpenGL ES 2

I'm trying to implement picking in my framework but I don't understand how I can do this. I'm working with: OpenGL ES 2. GLM mathematic library. What I have understand, picking can be made with ...
-1
votes
1answer
408 views

Changing map 0,0 origin to top left while using D3DXMatrixOrthoLH

Thanks to Tetrad (for pointing out D3DXMatrixOrthoLH ) I have figured out how to set it up in DirectX9. However, the problem I am now facing is my 0,0 mouse position is now in the middle. What I ...
-2
votes
1answer
236 views

Game Editor - When screen is clicked, how do you identify what coordinate you clicked?

This is a follow-up to my earlier question: Game Editor - When screen is clicked, how do you identify which object that is clicked? Something I've noticed is that picking only calculates a ray and ...
6
votes
2answers
398 views

How do I convert a 2D movement (from mouse) to a displacement along a 3d axis?

I'm making a small 3D scene editor (that only allow to modify objects positions). Each object is draw with a 3d X/Y/Z axis : How it works : user choose an axis (X, Y or Z) by left clicking on it, ...
1
vote
0answers
172 views

How to create 3d picking ray with the cursor position

I'm new here and I'm not sure how to go about doing this. I am creating an application that is supposed to use the cursor's position in the window to perform 3d picking. The tutorials I have found ...
2
votes
2answers
278 views

Assigning a different texture based on picking

I'm making a game using XNA. I have some simple objects like cube and sphere, and I would like to change the texture of one face of these objects based on picking. That is, when the cursor is over ...
-3
votes
1answer
379 views

Isometric Rendering and Picking [duplicate]

Possible Duplicate: Isometric rendering and picking? I've been looking for a formula to plot (world->screen) and mouse pick (world->screen) isometric tiles in a non-diamond-shaped world. ...
1
vote
0answers
459 views

2D isometric picking

I'm trying to implement picking in my isometric 2D game, however, I am failing. First of all, I've searched for a solution and came to several, different equations and even a solution using matrices. ...
2
votes
2answers
358 views

Unproject mouse position to tile — extremely jumpy position?

I'm trying to unproject the mouse position to get the position on the X-Z plane of a ray cast from the mouse. The camera is fully controllable by the user. Right now, the algorithm I'm using is... ...
0
votes
1answer
459 views

Color Picking Troubles - LWJGL/OpenGL

I'm attempting to check which object the user is hovering over. While everything seems to be just how I'd think it should be, I'm not able to get the correct color due to the second time I draw ...
3
votes
1answer
448 views

Best way to Draw a cube for 3D Picking on a specific face

Currently I am drawing a cube for a game that I am making and the cube draw method is below. My question is, what is the best way to draw a cube and to be able to easily find the face that the cursor ...
4
votes
2answers
496 views

How do I use D3DXVec3Unproject with D3D11?

I'm having a small issue with D3DXVec3Unproject. I'm currently using Direct3D 11 and not 10, and the signature for this function is: D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3D10_VIEWPORT ...
4
votes
2answers
905 views

Get world coordinate under mouse (at a ground plane for Warcraft 3 like movement)

I want to let a unit follow the mouse like in any RTS (Warcraft 3, Starcraft, ...). For that I have a "ground plane" which is defined through 2 vectors, the X and Z axis. Now I need to get the world ...
2
votes
1answer
361 views

OpenGL 3+ Range Picking

How do I perform range picking in the latest OpenGL version? By range picking I mean selecting all objects which are picked using a selection rectangle, like in an RTS game. For single object picking ...
0
votes
1answer
272 views

Java Slick2d - Mouse picking how to take into account camera

When I move it it obviously changes the viewport so my mouse picking is off. My camera is just a float x and y and I use g.translate(-cam.cameraX+400, -cam.cameraY+300); to translate the graphics. I ...
1
vote
1answer
233 views

How to perform efficient 2D picking in HTML5?

I'm currently using an R-Tree for both picking and collision testing. Each entity on screen has a bounding box for collisions and a separate one for picking. Since entities may change position very ...
4
votes
2answers
2k views

Ray Picking Problems

I've read so many answers on here about how to do Ray Picking, that I thought I had the idea of it down. But when I try to implement it in my game, I get garbage. I'm working with LWJGL. Here's the ...
3
votes
1answer
341 views

3d Picking under reticle

i'm currently trying to work out some 3d picking code that I started years ago, but then lost interested the assignment was completed (this part wasn't actually part of the assignment). I am not ...
-1
votes
2answers
617 views

How do I pick correct tile in isometric 3D map?

I want to know how to pick the correct tile on a isometric map in 3D space. Here is a 2D example. They use a colour key map to correctly pick the coordinate. How can I achieve this in 3D space? Is ...
6
votes
1answer
168 views

Excluding Background from Color Picking

I've implemented picking based on color coding, but I don't want the background color to be pickable. Is there any way in openGL (2.x) to exclude the background color? For some reason, doing ...
3
votes
1answer
94 views

Triangle Picking Picking Back faces

I'm having a bit of trouble with 3D picking, at first I thought my ray was inaccurate but it turns out that the picking is happening on faces facing the camera and faces facing away from the camera ...
1
vote
0answers
663 views

Picking 3D object with Mouse when using Camera Zooming in XNA 4.0

I've tried to figure out how to do picking with the mouse, and things work great when zoomed in all the way with the camera (Third Person Camera). And it works perfectly when using First Person ...
3
votes
2answers
886 views

Picking 2D objects after transforming camera in XNA

I have an XNA application (a force based visualisation of some circles) that I've implemented zooming and scrolling in, thanks to this guide. Before I had the camera implemented, I had picking ...
-2
votes
2answers
486 views

Picking a tile in an Iso Engine

I have developed an iso engine for a farm game. In general it works fine, but the problem is that it is not always accurate when pressing the tiles, so the tile I wanted to select is not the one ...
2
votes
0answers
1k views

Controlling 3D model with mouse XNA 4.0 C# [closed]

I am creating a 3D table tennis game and the racquet (created in Maya 2012) is controlled by the mouse. I have used picking method to control the racquet, however the cursor is not on the racquet. It ...
1
vote
1answer
198 views

Why is texturing interfering with my ID-based picking implementation?

Today I came across a tutorial about color picking and I implemented it on my machine. But there is a problem: when I disable the texture and draw the object I want to pick with its picking color, it ...
1
vote
3answers
3k views

3D picking lwjgl

I have written some code to preform 3D picking that for some reason dosn't work entirely correct! (Im using LWJGL just so you know.) I posted this at stackoverflow at first but after researching some ...
2
votes
1answer
1k views

Opengl-es picking object

I saw a lot of picking code opengl-es, but nothing worked. Can someone give me what am I missing? My code is (from tutorials/forums) Vec3 far = Camera.getPosition(); Vec3 near = ...
1
vote
1answer
3k views

Picking objects with mouse ray

I simply want to pick a few spheres in my scene using the mouse-ray. I have implemented(copied most of it but with little understanding) a ray-sphere collision code. Also I have implemented the code ...
3
votes
1answer
857 views

Ray picking - get direction from pitch and yaw

I am attempting to cast a ray from the center of the screen and check for collisions with objects. When rendering, I use these calls to set up the camera: GL11.glRotated(mPitch, 1, 0, 0); ...
2
votes
1answer
575 views

Triangle accuracy picking for animated models in XNA

I can do picking with triangle-accuracy for non-animated models, but I also have animated models in my game. How do I do picking on animated models? I use code based on this project for animation. ...
6
votes
2answers
6k views

How do you determine which object/surface the user's pointing at with lwjgl?

Title pretty much says it all. I'm working on a simple 'lets get used to lwjgl' project involving manipulation of a rubik's cube, and I can't figure out how to tell which side/square the user's ...