-
Some mUserData variables, such as the one in CompoundShapeSettings, are still uint32_t, instead of uint64_t. Should these be expanded to be 64-bit variables so they are suitable for storing custom pointers? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This is on purpose to keep compound shapes small (we have compounds with 1000s of shapes). |
Beta Was this translation helpful? Give feedback.
-
OK, makes sense. During contact callbacks, etc., is the SubShapeID one of these such sub-shapes, or does the 'parent' compound shape body ID consist of this? (I admit I have not gotten to the point of testing this yet) Essentially I want to be sure that if I am handling a contact, or a ray/shape cast, etc, I can find out the mUserPointer of the parent compound shape (the 64-bit mUserData). |
Beta Was this translation helpful? Give feedback.
The sub shape ID points to the leaf shape (which does have a uint64 user data, so if you're not sharing then you can use that), but you can traverse the entire hierarchy of shapes from the body to the leaf shape by writing a recursive function like: