Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Aug 07, 2017 10:16 am 
Offline

Joined: Tue Sep 22, 2015 1:34 pm
Posts: 21
Hi,

I use Bullet for picking and Ogre3d for rendering. I have 2 Questions:

1) If I have a double-sided plane and if I pick it I want to know if I pick front face or back face. It is possible to do that ?
2) How can I know wich subEntities or SubMesh i am picking ?

thx

++


Top
 Profile  
 
PostPosted: Tue Aug 08, 2017 5:32 pm 
Offline

Joined: Fri Apr 29, 2016 2:41 pm
Posts: 41
check the hit normal and take the dot product with the camera. If it's negative it's the side closest to you.


Top
 Profile  
 
PostPosted: Tue Aug 08, 2017 5:39 pm 
Offline

Joined: Fri Apr 29, 2016 2:41 pm
Posts: 41
Also the ClosestRayResultCallback will always yield the front plane if I'm correct.


Top
 Profile  
 
PostPosted: Wed Aug 09, 2017 9:42 pm 
Offline

Joined: Tue Sep 22, 2015 1:34 pm
Posts: 21
Ok thanks i will do that..

And do you have an idea about my second question ?

if I have severeal subEntities or SubMesh how can I know wich subEntities or SubMesh i am picking ?


Top
 Profile  
 
PostPosted: Thu Aug 10, 2017 2:06 pm 
Offline

Joined: Fri Apr 29, 2016 2:41 pm
Posts: 41
I'm not sure what you mean. btTriangleIndexVertexArray::addIndexedMesh ? A pool of vertices with child meshes? What exact bullet structure are you talking about?


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 17 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
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group