Glad you found your issue!
That's a common pattern, to make a list of thing you *want* to remove, then remove them in a second loop. I have that pattern in several places in my codebase.
Search found 11 matches
- Fri Jan 07, 2022 6:28 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Bullet crash
- Replies: 4
- Views: 6061
- Thu Jan 06, 2022 3:50 am
- Forum: General Bullet Physics Support and Feedback
- Topic: Bullet crash
- Replies: 4
- Views: 6061
Re: Bullet crash
To expound a bit on my theory... Take these two lines of code: const btCollisionObject* obA = contactManifold->getBody0(); ... void* usrDataB = obA->getUserPointer(); An example of what I'm talking about is: obA is a pointer to memory ... but maybe you freed that memory earlier in the program? If so...
- Thu Jan 06, 2022 3:42 am
- Forum: General Bullet Physics Support and Feedback
- Topic: Bullet crash
- Replies: 4
- Views: 6061
Re: Bullet crash
C++ is hard. Touch memory wrong *just once* and things explode. In my experience (not just about Bullet, but with any C++ code) the most common issue is that you are sharing a pointer to some objects, the memory for that object gets freed ("delete" in C++) somewhere, but that pointer is st...
- Thu Dec 02, 2021 10:48 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Raycast Vehicle - driving on dynamic bodies
- Replies: 0
- Views: 21662
Raycast Vehicle - driving on dynamic bodies
I noticed this comment in btRaycastVehicle. I dug through the git history to see where that comment came from ... turns out it has been there since 2006 in the first commit of the btRaycastVehicle. So, I'm hoping someone from the core team can provide some history or context ... why does btRaycastVe...
- Thu Dec 02, 2021 10:39 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Where is the old wiki?
- Replies: 4
- Views: 10276
Re: Where is the old wiki?
Bump! Many places on this forum link to the wiki (and such posts rely on the wiki to explain something), so there is a tremendous amount of knowledge lost right now.
- Thu Mar 25, 2021 3:57 am
- Forum: General Bullet Physics Support and Feedback
- Topic: btPersistentManifold::getNumContacts always returns zero
- Replies: 3
- Views: 6816
Re: btPersistentManifold::getNumContacts always returns zero
Yep, I'm seeing the same behavior as @s_kohan. Even if there is a btPersistentManifold, you still have to check getNumContacts() > 0 to actually know if the collision is for-realz.
- Tue Mar 23, 2021 3:30 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: "multiple mesh parts" with btBvhTriangleMeshShape?
- Replies: 4
- Views: 5874
Re: "multiple mesh parts" with btBvhTriangleMeshShape?
Yes, that's actually how I ran into this myself (except we're loading GLTF instead of FBX but whatever, conceptually the same). Actually I went ahead and am just using btTriangleMesh (implements btStridingMeshInterface ) and I'm just adding all triangles to one "part" (because that's a lim...
- Fri Mar 19, 2021 11:30 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: "multiple mesh parts" with btBvhTriangleMeshShape?
- Replies: 4
- Views: 5874
Re: "multiple mesh parts" with btBvhTriangleMeshShape?
Here's the manual I was referring to: https://github.com/bulletphysics/bullet3/blob/395e17c7bf2fd1b906f41aa651bb145dcedeb873/docs/Bullet_User_Manual.pdf (middle-ish of page 14) Says, "The btBvhTriangleMeshShape can store multiple mesh parts. It keeps a triangle index and part index in a 32bit s...
- Fri Mar 19, 2021 6:17 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: "multiple mesh parts" with btBvhTriangleMeshShape?
- Replies: 4
- Views: 5874
"multiple mesh parts" with btBvhTriangleMeshShape?
The User's Manual says that a btBvhTriangleMeshShape can store "multiple mesh parts" (page 14). I studied the source of btTriangleMesh and it only uses one (1) "part" (i.e. only one entry goes into the `m_indexedMeshes` array). So, my question (I've tried studying the code deeper...
- Tue Feb 16, 2021 11:12 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: [Solved]If I want hard constraints is featherstone and multibody the only effective solution?
- Replies: 5
- Views: 6756
Re: [Solved]If I want hard constraints is featherstone and multibody the only effective solution?
Thanks for following up with you solution, Octavius_Ace. Glad to hear it, and I'll give it a try soon to see if I can solve my own "constraint stretching" issues as well. Sidenote... You say: When objects get unrealistically large, I find the simulation becomes very 'floaty', Maybe this is...
- Thu Jan 28, 2021 12:28 am
- Forum: General Bullet Physics Support and Feedback
- Topic: [Solved]If I want hard constraints is featherstone and multibody the only effective solution?
- Replies: 5
- Views: 6756
Re: If I want hard constraints is featherstone and multibody the only effective solution?
I'm also very interested in knowing the answer to your questions. Hopefully someone who knows the multibody world can help us here.