It is currently Sun Dec 16, 2018 4:09 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Pick commands
PostPosted: Sun Nov 25, 2018 4:03 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Jun 11, 2003 9:33 pm
Posts: 4496
Location: Spa, relaxing and thinking, and learning...
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:
Quote:
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
While (world==business) {world+=mafia}


Top
 Profile  
Reply with quote  
 Post subject: Re: Pick commands
PostPosted: Sun Nov 25, 2018 7:56 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Aug 19, 2003 11:36 am
Posts: 1406
Location: Doubs - France
https://www.purebasic.com/documentation/engine3d/mouseraycast.html

_________________
Please correct my english
http://purebasic.developpez.com/


Top
 Profile  
Reply with quote  
 Post subject: Re: Pick commands
PostPosted: Sun Nov 25, 2018 8:08 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Jun 11, 2003 9:33 pm
Posts: 4496
Location: Spa, relaxing and thinking, and learning...
Nice!
It is also an example of that in the native package, thanks! :oops: :)

_________________
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
While (world==business) {world+=mafia}


Top
 Profile  
Reply with quote  
 Post subject: Re: Pick commands
PostPosted: Sun Nov 25, 2018 9:45 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 02, 2003 9:16 am
Posts: 2078
Location: Germany
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye