Search found 639 matches

by drleviathan
Mon Aug 31, 2020 2:32 am
Forum: General Bullet Physics Support and Feedback
Topic: btDbvt broadphase stages and tree
Replies: 1
Views: 425

Re: btDbvt broadphase stages and tree

I don't have any good ideas about how one might dig into the internals of the btDbvt broadphase to feed your AI, however it is possible to use a btPairCachingGhostObject to help optimize tracking of nearby objects. The normal scenario goes something like this: You have a Character who needs to know ...
by drleviathan
Wed Aug 19, 2020 2:31 pm
Forum: General Bullet Physics Support and Feedback
Topic: The thin "btBoxShape" box cannot to be laid flat on the "btConvexHullShape" plane.
Replies: 1
Views: 306

Re: The thin "btBoxShape" box cannot to be laid flat on the "btConvexHullShape" plane.

Bullet will deactivate moving bodies when both velocities are below some thresholds for > 2 seconds. The default thresholds are hard coded magic numbers: linearSleepingThreshold = 0.8 m/sec angularSleepingThreshold = 1.0 rad/sec With those defaults it is possible for slowly tumbling objects, or even...
by drleviathan
Sun Aug 16, 2020 4:03 pm
Forum: General Bullet Physics Support and Feedback
Topic: Batched raycasting wrapper in C
Replies: 4
Views: 583

Re: Batched raycasting wrapper in C

Hrm... True, there is an #ifdef BATCH_RAYCASTER inside examples/Heightfield/HeightfieldExample.cpp however I don't see any evidence it actually works... in Bullet 2.88 because it relies on a gBatchRaycaster being a valid pointer but there is no code that actually declares or sets it. AFAICT: if you ...
by drleviathan
Thu Aug 13, 2020 4:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: Batched raycasting wrapper in C
Replies: 4
Views: 583

Re: Batched raycasting wrapper in C

By "batched" which one of these do you mean:? (1) "One raycast against the whole (batched) world of objects" (2) "A batch of raycasts against the whole world of objects" Item (1) does exist as a feature of the BulletPhysics API. Item (2) does not. Item (1) is done through btCollisionWorld::rayTest()...
by drleviathan
Mon Aug 03, 2020 3:06 pm
Forum: General Bullet Physics Support and Feedback
Topic: Bullet Dynamics CollisionShapes giving null pointer in CollisionObject
Replies: 1
Views: 454

Re: Bullet Dynamics CollisionShapes giving null pointer in CollisionObject

Your problems are mysterious but they don't sound like problems with Bullet per-se. For example consider this bit of code: objectChaserBus = new btCollisionObject; objectChaserBus->setCollisionShape(chaserbusShape); std::cout<<"OBJ BUS "<<objectChaserBus->getCollisionShape()<<std::endl; // Prints 0 ...
by drleviathan
Tue Jul 28, 2020 2:56 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to get the velocity of rigid body
Replies: 5
Views: 998

Re: How to get the velocity of rigid body

speed = deltaDistance / deltaTime = meters /second acceleration = deltaSpeed / deltaTime = meters / second^2 There is no RigidBody::getLinearAcceleration() method in the API. There is a RigidBody::getGravity() method which would provide the free-fall acceleration sans collisions. To measure the tru...
by drleviathan
Thu Jul 23, 2020 4:18 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to change Eulerian angle yzx
Replies: 2
Views: 734

Re: How to change Eulerian angle yzx

I don't know how to do what you asked off the top of my head. It sounds... possible, but complicated. There are many different varieties of "Euler angles" and you'd have to define exactly what you mean. For example... are the axes of your Y, then Z, then X rotations in the world-frame or the object ...
by drleviathan
Mon Jul 20, 2020 2:22 pm
Forum: General Bullet Physics Support and Feedback
Topic: Constraint Problem: Fix Constraint is Not Fixed
Replies: 3
Views: 736

Re: Constraint Problem: Fix Constraint is Not Fixed

btFixedConstraints should work ok until you get interconnected pieces with a large number of joints. As the constraint number grows the whole collection gets "soft" and the constraints will not be fully satisfied. The collection will appear to "sag" under collisions (and gravity, if you have it). Th...
by drleviathan
Mon Jul 13, 2020 2:25 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to get the velocity of rigid body
Replies: 5
Views: 998

Re: How to get the velocity of rigid body

Speed is the magnitude of velocity --> compute the length of the btVector3.
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: 1013

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: 1013

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: 1010

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: 1010

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: 1013

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

You have #include the right header file to obtain the CProfileManager declarations.