Pick commands

Everything related to 3D programming
User avatar
Psychophanta
Addict
Addict
Posts: 4969
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Pick commands

Post by Psychophanta »

I try to MousePick() some entities in screen but when entities are near , then the pick command is not able to "watch" the real mesh is pointed to with the mouse pointer, because the bounding boxes are overlapped ones over others.
As the manual says:
The entity pick is based on its bounding box, not on its mesh.
Is not there a way or workaround to pick the real viewed mesh?
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
User avatar
Comtois
Addict
Addict
Posts: 1429
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: Pick commands

Post by Comtois »

Please correct my english
http://purebasic.developpez.com/
User avatar
Psychophanta
Addict
Addict
Posts: 4969
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Re: Pick commands

Post by Psychophanta »

Nice!
It is also an example of that in the native package, thanks! :oops: :)
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
DarkDragon
Addict
Addict
Posts: 2218
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: Pick commands

Post by DarkDragon »

The picking is implemented in a weird way though. Usually the scene is simply rendered into a offscreen buffer where each entity belongs to a color. From the color under the screen coordinate you can then get the entity back. This has nothing to do with bounding boxes usually!

The rayxasting is all performed on CPU and not efficient for large scenes. In my eyes this is a bug.
bye,
Daniel
User avatar
Psychophanta
Addict
Addict
Posts: 4969
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Re: Pick commands

Post by Psychophanta »

DarkDragon wrote: Sun Nov 25, 2018 9:45 pm The picking is implemented in a weird way though. Usually the scene is simply rendered into a offscreen buffer where each entity belongs to a color. From the color under the screen coordinate you can then get the entity back. This has nothing to do with bounding boxes usually!

The rayxasting is all performed on CPU and not efficient for large scenes. In my eyes this is a bug.
Indeed, it is a featured bug.
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
Post Reply