Search found 630 matches

by drleviathan
Thu Jul 02, 2020 7:27 pm
Forum: General Bullet Physics Support and Feedback
Topic: When the rigid body becomes more, the program becomes stuck
Replies: 7
Views: 290

Re: When the rigid body becomes more, the program becomes stuck

(1) Your Bullet libraries (LinearMath, specifically) must be compiled with: -DBT_ENABLE_PROFILE This may mean you need to compile the libs from source and add that option. (2) You wouldn't want to dumpAll() every step because that would make your simulation much slower than it already is, and would...
by drleviathan
Thu Jul 02, 2020 3:21 am
Forum: General Bullet Physics Support and Feedback
Topic: When the rigid body becomes more, the program becomes stuck
Replies: 7
Views: 290

Re: When the rigid body becomes more, the program becomes stuck

If you actually follow through with the CProfileManager stuff then you would get an idea as to where the bottlenecks are and how much time is spent in the various steps of the simulation. This would help you solve your problem, and also help you determine if you are actually fixing it with any worka...
by drleviathan
Thu Jul 02, 2020 3:04 am
Forum: General Bullet Physics Support and Feedback
Topic: find a certain internal position of the 3D model
Replies: 4
Views: 196

Re: find a certain internal position of the 3D model

Here are some ideas that occur to me: Assuming your tube is closed and a small ball will not fall out once it is placed inside... (1) Place a ball randomly (with some quantization) and let it fall. If it falls out the bottom of your simulation after a certain amount of time then conclude it was not ...
by drleviathan
Wed Jul 01, 2020 3:13 pm
Forum: General Bullet Physics Support and Feedback
Topic: find a certain internal position of the 3D model
Replies: 4
Views: 196

Re: find a certain internal position of the 3D model

In this other thread you mention your Bullet simulation slows or blocks when you "increase the number of small balls". What you failed to mention in that thread, but what appears to be the case in this one, you are running those small balls inside a concave mesh object. If that really is your world ...
by drleviathan
Wed Jul 01, 2020 2:36 pm
Forum: General Bullet Physics Support and Feedback
Topic: When the rigid body becomes more, the program becomes stuck
Replies: 7
Views: 290

Re: When the rigid body becomes more, the program becomes stuck

You have #include the right header file to obtain the CProfileManager declarations.
by drleviathan
Wed Jul 01, 2020 4:28 am
Forum: General Bullet Physics Support and Feedback
Topic: When the rigid body becomes more, the program becomes stuck
Replies: 7
Views: 290

Re: When the rigid body becomes more, the program becomes stuck

How many small balls are you talking about? What are the parameters of the hardware you're using? You might be running into the limits of Bullet on your system. There is a way to obtain detailed stats about where time is being spent inside the stepSimulation() context, which would help you identify ...
by drleviathan
Tue Jun 30, 2020 3:11 pm
Forum: General Bullet Physics Support and Feedback
Topic: Why the box will shake when it drop onto the surface with btConvexHullShape?
Replies: 2
Views: 210

Re: Why the box will shake when it drop onto the surface with btConvexHullShape?

Don't set the margin of the convex hull to 0.0. Leave it at the default (which is 0.04m I think) and see if that makes your problem go away. My hypothesis is: you are allowing the box to actually penetrate the convex hull and the penetration resolution logic is kicking in. The penetration resolution...
by drleviathan
Sun Jun 28, 2020 9:59 pm
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Dynamic Character Controller doubt
Replies: 4
Views: 238

Re: Dynamic Character Controller doubt

The solution gets the current transform (position + rotation), overwrites the rotation part, and slams the body's transform to be that of the modified value. The end result is: the body's position doesn't change, but its rotation does. You set the angular velocity to be zero because... it shouldn't ...
by drleviathan
Sun Jun 28, 2020 9:46 pm
Forum: General Bullet Physics Support and Feedback
Topic: When the external rigid body moves, the collision objects inside the rigid body leak out
Replies: 3
Views: 363

Re: When the external rigid body moves, the collision objects inside the rigid body leak out

The simplest way would be to use a btConvexHullShape for each cuboid wall and assemble them into a btCompoundShape . The points for each convex hull would be the eight corners of the wall box, and you could let all the points be in the local-frame of the btCompoundShape , so you could supply identit...
by drleviathan
Sat Jun 27, 2020 9:04 pm
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Dynamic Character Controller doubt
Replies: 4
Views: 238

Re: Dynamic Character Controller doubt

A solution to this problem I have used successfully is to not allow non-zero angular velocity of the character and just slam its rotation. In other words, in CharacterController::updateAction() do something like this: btTransform transform = body->getWorldTransform(); transform.setRotation(desiredRo...
by drleviathan
Wed Jun 24, 2020 8:02 pm
Forum: General Bullet Physics Support and Feedback
Topic: When the external rigid body moves, the collision objects inside the rigid body leak out
Replies: 3
Views: 363

Re: When the external rigid body moves, the collision objects inside the rigid body leak out

When you change the rotation of the hollow box you are effectively "teleporting" it to a new transform. If its new transform happens to put its walls into penetration with balls that used to be inside --> then Bullet's "penetration resolution" algorithm will kick in and it doesn't care about keeping...
by drleviathan
Wed Jun 24, 2020 6:21 am
Forum: General Bullet Physics Support and Feedback
Topic: How to solve the problem of the ball penetrating the cuboid
Replies: 6
Views: 498

Re: How to solve the problem of the ball penetrating the cuboid

The simple way to do it is to use: btCollisionObject::setWorldTransform()

So the code might look like this:

Code: Select all

btTransform t = body->getWorldTransform();
t.setRotation(btQuaternion(roll, pitch, yaw));
body->setWorldTransform(t);
by drleviathan
Tue Jun 23, 2020 1:42 pm
Forum: General Bullet Physics Support and Feedback
Topic: Custom raytest callback not giving proper results
Replies: 2
Views: 252

Re: Custom raytest callback not giving proper results

When I look at btCollisionWorld::rayTestSingleInternal() I see: for many shapes it goes into triangleMesh->performRaycast() rather than concaveShape->processAllTriangles(). Maybe set your breakpoint there?
by drleviathan
Tue Jun 23, 2020 1:33 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to solve the problem of the ball penetrating the cuboid
Replies: 6
Views: 498

Re: How to solve the problem of the ball penetrating the cuboid

I see. You have a logic error rather than a question about Euler angles and quaternions. The good news is: I don't see the fault of the code you posted. The bad news would be: your bug is somewhere else. Maybe post your full code up on github? Good luck.