## Search found 799 matches

Tue May 10, 2022 4:30 pm
Forum: General Bullet Physics Support and Feedback
Topic: Max number of elements?
Replies: 1
Views: 279

### Re: Max number of elements?

There is not enough information to answer your question. You will just have to try it to find out. Here are some questions about things that would affect the answer: Are all the elements dynamic? Or are some of them static or kinematic? Are all of the elements rigid bodies? Or will you be needing so...
Thu May 05, 2022 3:13 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to know if a body is colliding
Replies: 1
Views: 267

### Re: How to know if a body is colliding

One way to do it is to scan all of the contact manifolds after each step. So something like this: void updateContactMap(btCollisionDispatcher* collision_dispatcher) { int num_manifolds = collision_dispatcher->getNumManifolds(); for (int i = 0; i < num_manifolds; ++i) { btPersistentManifold* contact_...
Thu May 05, 2022 2:59 pm
Forum: General Bullet Physics Support and Feedback
Topic: Jitter when a btBoxShape moves against a btConvexHullShape.
Replies: 2
Views: 352

### Re: Jitter when a btBoxShape moves against a btConvexHullShape.

Make the conveyor kinematic instead of static, give it a non-zero velocity but don't change its position. Then dynamic objects that touch it will pick up the non-zero velocity from the collision and will move along.
Thu Apr 28, 2022 3:28 pm
Forum: General Bullet Physics Support and Feedback
Topic: Static `btConvexHullShape` Not Participating in Collisions
Replies: 2
Views: 248

### Re: Static `btConvexHullShape` Not Participating in Collisions

btConvexHullShape does work, so I would expect something else is wrong. Does the object properly collide when you supply it with a different shape but leave all other code unchanged?
Sat Apr 23, 2022 4:41 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to remove vehicle/rigidbody from dynamics worlds without deleting memory
Replies: 3
Views: 362

### Re: How to remove vehicle/rigidbody from dynamics worlds without deleting memory

Yes, if you remove a body from the dynamics world then it will not collide. There are ways to leave a body in the dynamics world while disabling all or selective collisions. One way to do this is to assign each object to one or more collision groups and to specify which groups it collides with. This...
Tue Apr 19, 2022 3:44 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to create a homing missile?
Replies: 7
Views: 4063

### Re: How to create a homing missile?

I forgot to mention some other ideas: (5) As hinted at in (3) where I mentioned fins + atmospheric substrate... if you provide a stronger coupling between the missile's forward direction and its linear velocity, such that when it changes direction it also tends to re-orient the existing velocity to ...
Mon Apr 18, 2022 8:17 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to create a homing missile?
Replies: 7
Views: 4063

### Re: How to create a homing missile?

I have a few ideas for making a homing missile smarter: (1) Reduce the value of EXPONENTIAL_TIMESCALE . This will make the missile orient toward its intended target faster. However, this just effectively reduces the orbit radius of the problem you're seeing and it makes the homing behavior more aggr...
Wed Mar 30, 2022 4:56 pm
Forum: General Bullet Physics Support and Feedback
Topic: Best way to detect contact points / manifolds of overlapping kinematic bodies?
Replies: 3
Views: 836

### Re: Best way to detect contact points / manifolds of overlapping kinematic bodies?

I would guess the 0.2 is a tuned magic number that allows the btKinematicCharacterController to extract itself from penetration over several substeps rather than in one. It moves out 20% every substep and if your simulation is running at 60 substeps per second then the character could reduce penetra...
Tue Mar 29, 2022 7:07 am
Forum: General Bullet Physics Support and Feedback
Topic: How kinematic bodies work under the hood
Replies: 6
Views: 917

### Re: How kinematic bodies work under the hood

Sorry, I was getting Lagrangian dynamics confused with the Jacobi method which is what Bullet uses to solve constraints. When solving the Jacobi matrices of the various constraints the iterative method converges on the new final values of the transform and velocities without explicit knowledge of th...
Mon Mar 28, 2022 10:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: How kinematic bodies work under the hood
Replies: 6
Views: 917

### Re: How kinematic bodies work under the hood

The pivot on the kinematic object is effectively a constraint of the Lagrangian dynamics. It is determined by the transform/velocities of the kinematic object, which effectively has infinite mass and inertia, and are therefore known as soon as the kinematic object's transform/velocities have been re...
Mon Mar 28, 2022 4:53 am
Forum: General Bullet Physics Support and Feedback
Topic: How kinematic bodies work under the hood
Replies: 6
Views: 917

### Re: How kinematic bodies work under the hood

Bullet does not integrate kinematic objects forward. Instead it relies on custom external logic (e.g. stuff the game dev wrote) to supply their world transforms every substep. Typically this is done by supplying a MotionState that does the Right Thing inside its getWorldTransform() override. Usually...
Tue Mar 15, 2022 1:34 pm
Forum: General Bullet Physics Support and Feedback
Topic: Is it safe to add rigidbody/collisionObject into the world during StepSimulation? [Single Thread Situation]
Replies: 3
Views: 1445

### Re: Is it safe to add rigidbody/collisionObject into the world during StepSimulation? [Single Thread Situation]

I remembered something and figured I would mention it for the record: I had a situation where I wanted to be able to add/update/remove objects ASAP for a multi-threaded system where the operations could arrive from a different thread. The pending ops would be collated into three lists (add, update, ...
Fri Mar 11, 2022 6:37 am
Forum: General Bullet Physics Support and Feedback
Topic: Is it safe to add rigidbody/collisionObject into the world during StepSimulation? [Single Thread Situation]
Replies: 3
Views: 1445

### Re: Is it safe to add rigidbody/collisionObject into the world during StepSimulation? [Single Thread Situation]

The simple answer: no. A more complicated answer: the step consists of multiple substeps . It might be ok to add/remove a RigidBody/CollisionObject between substeps, however there is no default hook for calling your add/remove logic between substeps: you would have to add your own. Within the subste...
Thu Mar 10, 2022 4:13 am
Forum: General Bullet Physics Support and Feedback
Topic: Can I update btRigidBody without adding/removing it from world?
Replies: 4
Views: 1269

### Re: Can I update btRigidBody without adding/removing it from world?

For the inertia tensor, make sure to remove the object from the world before making the change, and re-insert it afterwards. Yes, changing the mass would also change the inertia tensor. It turns out the only way to change the mass is to make a call that also takes the local inertia diagonal. Bullet...
Wed Mar 09, 2022 8:33 pm
Forum: General Bullet Physics Support and Feedback
Topic: Can I update btRigidBody without adding/removing it from world?
Replies: 4
Views: 1269

### Re: Can I update btRigidBody without adding/removing it from world?

I read that for something as simple as changing the mass of the btRigidBody, it must be removed and re-added to the world. Not true: you can dynamically change the mass of a RigidBody without re-adding it to the world. However, if the body is inactive --> you probably want to activate it just in ca...