I want to know if i'm picking front face or back face

Post Reply
Furya
Posts: 24
Joined: Tue Sep 22, 2015 1:34 pm

I want to know if i'm picking front face or back face

Post by Furya »

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

++
erbisme4@yahoo.com
Posts: 41
Joined: Fri Apr 29, 2016 2:41 pm

Re: I want to know if i'm picking front face or back face

Post by erbisme4@yahoo.com »

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

Re: I want to know if i'm picking front face or back face

Post by erbisme4@yahoo.com »

Also the ClosestRayResultCallback will always yield the front plane if I'm correct.
Furya
Posts: 24
Joined: Tue Sep 22, 2015 1:34 pm

Re: I want to know if i'm picking front face or back face

Post by Furya »

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 ?
erbisme4@yahoo.com
Posts: 41
Joined: Fri Apr 29, 2016 2:41 pm

Re: I want to know if i'm picking front face or back face

Post by erbisme4@yahoo.com »

I'm not sure what you mean. btTriangleIndexVertexArray::addIndexedMesh ? A pool of vertices with child meshes? What exact bullet structure are you talking about?
Post Reply