select, drag and modify

3 replies to this topic

#1cellox

New Member

• Members
• 2 posts

Posted 09 February 2003 - 12:29 AM

Hi,

I have problem about picking, selection with special issue which is "drag and modify" selected object in OpenGL...

Helps, tutorials suggestions or references will greatly be appreciated...

Thanx you all...

#2Dia

DevMaster Staff

• 1120 posts

Posted 09 February 2003 - 01:55 AM

you could try out the tutorial at http://www.gametutorials.com/Tutorials/ope.../OpenGL_Pg3.htm which is the 4 tutorial down (called: Object Selection). It deals with picking in opengl.

I hope that helps.

#3cellox

New Member

• Members
• 2 posts

Posted 09 February 2003 - 02:18 AM

apex said:

you could try out the tutorial at http://www.gametutorials.com/Tutorials/ope.../OpenGL_Pg3.htm which is the 4 tutorial down (called: Object Selection). It deals with picking in opengl.

I hope that helps.
Well thanx,

I have checked the website and indeed there unfortunately is nothing new to me, only a classical selection
sample code...

But my problem is a bit more complicated as I think...What i want to do is select an object among others, drag it, change position or modify it by draging, and drop it...

This is not so advaced a topic as far as i think but i need help...

Thanx again...

#4donBerto

Senior Member

• Members
• 369 posts

Posted 09 February 2003 - 03:19 AM

sounds like you need to be more specific. you could give us an example of what you want accomplished or maybe show us where you think the problem is by showing some code.

here's something I would do [pseudocode]
. . .
if ( 'picked' and choice_button_down)
click-dragging for this object is enabled.
(picked object's new location) temporary location --> x = current mouse position
(picked object's new location) temporary location --> y = current mouse position

if ( click-dragging for any object was enabled AND no mouse button | dragging is going on)
current or enabled object's new position temporary location
. . .


I hope that places you in the right direction.

my regards.
Imagine.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users