Selection bounding box extension

Problems building or running the engine, queries about how to use features etc.
Post Reply
claudiocordara
Gnoblar
Posts: 1
Joined: Thu Sep 08, 2016 9:53 am

Selection bounding box extension

Post by claudiocordara »

Ogre Version: 1.11.2 (Rhagorthua)
Operating System: Windows 10
Render System: Direct3D 9

Hello,

Here is my problem, I need to extend the bounding box of an entity (or of the node
that contains that entity) used by the RaySceneQuery procedure to implement the selection
of an object on the screen.
What I need is the possibility to select an object even if the click is not in its bounding
box but in prossimity of the bounding box (within a given tolerance).
I have searched many times for a possible solution to this problem even in this forum
without success.
Any suggestion will be much appreciated

Thank You
Claudio Cordara
User avatar
saintnick
Halfling
Posts: 51
Joined: Tue Nov 27, 2018 1:41 am
x 5

Re: Selection bounding box extension

Post by saintnick »

One solution might be to use a volume query instead. This could select a unit 'around' where you clicked.

http://wiki.ogre3d.org/Intermediate+Tut ... _Selection
User avatar
saintnick
Halfling
Posts: 51
Joined: Tue Nov 27, 2018 1:41 am
x 5

Re: Selection bounding box extension

Post by saintnick »

My previous post increases the area you select. After rereading your original post I realized you want to increase the area around your object that will select your object. You could create a square or rectangle object scaled to your needs and create a child scene node to your object. Then when your box is selected select the object it is a child of and ignore the box.
Post Reply