You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, here is a scenario:
You have a rigid body that uses a compound shape.
You perform a raycast and hit the rigid body.
But you wish to know which child of the compound shape was hit, but the callbacks don't have that information, the best you can get is the rigid body that was hit.
During the callback processing, there are functions that take a LocalRayResult, like addSingleResult, which contains m_localShapeInfo, giving more information about the hit, such as m_triangleIndex, which can be used to obtain the child shape.
This discussion was converted from issue #629 on April 26, 2021 03:52.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
So, here is a scenario:
You have a rigid body that uses a compound shape.
You perform a raycast and hit the rigid body.
But you wish to know which child of the compound shape was hit, but the callbacks don't have that information, the best you can get is the rigid body that was hit.
During the callback processing, there are functions that take a LocalRayResult, like addSingleResult, which contains m_localShapeInfo, giving more information about the hit, such as m_triangleIndex, which can be used to obtain the child shape.
It would be very useful to have that bit of information without having to sub-class ray cast callbacks, like I did over here https://gitgud.io/stephenlynx/SpaceLynx/blob/master/src/CustomRayCast.cpp
Beta Was this translation helpful? Give feedback.
All reactions