Compound shape child raycasting

cj45
Posts: 2
Joined: Tue Mar 19, 2013 1:48 pm

Compound shape child raycasting

Post by cj45 »

hello, my game requires to raycast compound shapes and obtain the CompoundChild that were hit by the raycast.
Is this implemented in bullet? And if not, could you point me how i could implement it?
cj45
Posts: 2
Joined: Tue Mar 19, 2013 1:48 pm

Re: Compound shape child raycasting

Post by cj45 »

i went through the source and found out how already, what i did was extend/copy AllHitsRayResultCallback to expose int m_triangleIndex; which is in btCollisionWorld::LocalRayResult > m_localShapeInfo

well, thanks for a good physics engine anyway!
allsey87
Posts: 33
Joined: Fri Oct 26, 2012 1:50 pm

Re: Compound shape child raycasting

Post by allsey87 »

Good job, and thanks for posting back your solution to the problem!
STTrife
Posts: 109
Joined: Tue May 01, 2012 10:42 am

Re: Compound shape child raycasting

Post by STTrife »

Thank you, I will also need that later on in my project :)