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
++
I want to know if i'm picking front face or back face
-
- Posts: 24
- Joined: Tue Sep 22, 2015 1:34 pm
-
- Posts: 41
- Joined: Fri Apr 29, 2016 2:41 pm
Re: I want to know if i'm picking front face or back face
check the hit normal and take the dot product with the camera. If it's negative it's the side closest to you.
-
- Posts: 41
- Joined: Fri Apr 29, 2016 2:41 pm
Re: I want to know if i'm picking front face or back face
Also the ClosestRayResultCallback will always yield the front plane if I'm correct.
-
- Posts: 24
- Joined: Tue Sep 22, 2015 1:34 pm
Re: I want to know if i'm picking front face or back face
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 ?
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 ?
-
- Posts: 41
- Joined: Fri Apr 29, 2016 2:41 pm
Re: I want to know if i'm picking front face or back face
I'm not sure what you mean. btTriangleIndexVertexArray::addIndexedMesh ? A pool of vertices with child meshes? What exact bullet structure are you talking about?