Picking and so on
i've wrote a picking system for my engine and works fine. but i would like to improve it, so how it's possible to "highlight" selectable objects when the mouse is on them (without cliking) ?
I mean, i need a way to distinguish selectable objects from the others :/
Are you talking about how to viualy mark what objects are selectable? If so there are number of ways to do it. The simplest would be to change their color a bit when mouse is over them. Or render selected tris in texture and then blend this texture over scene giving selcted tris kind of glow. In both cases you might want to change color over time (pulsing, sinus, HSV/hue shift,...).
You should never let your fears become the boundaries of your dreams.
I think he is after a method to actually find the objects, rather than how to highlight them...
I would probably do a seperate render of just the selectable objects, then use opengl feedback mode to get the highlighted object.
More info on your picking strategy would help us help you though.
I would probably do a seperate render of just the selectable objects, then use opengl feedback mode to get the highlighted object.
More info on your picking strategy would help us help you though.
i need a way to detect when the mouse is over a selectable object,not to select them :/
all right well you have a way to check what object that mouse is over right? you use it when you click...so just go like this
highlightobj=getobj_mouse(m_x,m_y);
highlightobj.highlightrender();
now that well not work but do you get the idea? adn getobj_mouse gets the object that the mouse is over.
highlightobj=getobj_mouse(m_x,m_y);
highlightobj.highlightrender();
now that well not work but do you get the idea? adn getobj_mouse gets the object that the mouse is over.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement