Search found 567 matches

by drleviathan
Tue Jan 07, 2020 4:59 pm
Forum: General Bullet Physics Support and Feedback
Topic: Question about rigid body update/collision detection order?
Replies: 2
Views: 287

Re: Question about rigid body update/collision detection order?

The Bullet source is open so you can dig into it and see the order of operations. When I examine btDiscreteDynamicsWorld::stepSimulation() I see something like this (in pseudo code): int btDiscreteDynamicsWorld::stepSimulation(btScalar timeStep, int maxSubSteps, btScalar fixedTimeStep) { computeNumb...
by drleviathan
Fri Jan 03, 2020 4:48 pm
Forum: General Bullet Physics Support and Feedback
Topic: 2 Problems with Raycast Vehicle
Replies: 7
Views: 433

Re: 2 Problems with Raycast Vehicle

It is good you found a workaround for the trembling problem, however its source is still a mystery. It is definitely not a problem with inertia tensors because the ground object would be static (mass = 0.0). Meanwhile for the record: Bullet's shape utilities use a simple box inertia tensor approxima...
by drleviathan
Thu Jan 02, 2020 5:20 pm
Forum: General Bullet Physics Support and Feedback
Topic: 2 Problems with Raycast Vehicle
Replies: 7
Views: 433

Re: 2 Problems with Raycast Vehicle

As to your first problem (non-zero acceleration when setting non-zero force): You may recall one of Newton's law of motion is "the acceleration of the object is proportional to the net force on it and inversely proportional to its mass ". This is often written mathematically as: force = mass * accel...
by drleviathan
Fri Dec 27, 2019 1:51 am
Forum: General Bullet Physics Support and Feedback
Topic: No friction perpendicular to m_lateralFrictionDir1 when using custom contactAddedCallback
Replies: 3
Views: 316

Re: No friction perpendicular to m_lateralFrictionDir1 when using custom contactAddedCallback

It should work for kinematic objects. You would want a kinematic object with non-zero velocity but whose position never actually changes. I dunno Godot but perhaps it has a way to do that.
by drleviathan
Thu Dec 26, 2019 4:17 pm
Forum: General Bullet Physics Support and Feedback
Topic: No friction perpendicular to m_lateralFrictionDir1 when using custom contactAddedCallback
Replies: 3
Views: 316

Re: No friction perpendicular to m_lateralFrictionDir1 when using custom contactAddedCallback

The alternate solution as mentioned in the linked thread is to give the conveyor a non-zero velocity in the direction you want it to convey. No callback complexity required, however this solution requires the conveyor be either static or kinematic but not dynamic . In this scenario the conveyor is n...
by drleviathan
Mon Dec 16, 2019 4:28 pm
Forum: General Bullet Physics Support and Feedback
Topic: Free fall violates 2nd Newton’s Law?
Replies: 3
Views: 422

Re: Free fall violates 2nd Newton’s Law?

Per-object velocity damping is a feature of most real-time physics engines, primarily as a way to help it settle down by dissipating energy. It is always done as an approximate way (first order function of velocity) and works fine for approximating "friction through a fluid" at low world-frame speed...
by drleviathan
Fri Dec 13, 2019 6:17 pm
Forum: General Bullet Physics Support and Feedback
Topic: Free fall violates 2nd Newton’s Law?
Replies: 3
Views: 422

Re: Free fall violates 2nd Newton’s Law?

My first guess is the box has non-zero linearDamping coefficient by default. Maybe try:

Code: Select all

p.changeDynamics(boxId, -1, linearDamping=0, angularDamping=0)
by drleviathan
Wed Dec 11, 2019 5:37 pm
Forum: General Bullet Physics Support and Feedback
Topic: Detect collision object in visual object
Replies: 3
Views: 371

Re: Detect collision object in visual object

I don't know how the python stuff works. I think it uses the CAPI under the hood and if so: that would probably have to be enhanced to get your custom feature exposed. However, perhaps there is already an event you can handle in python when a "ghost overlap add" happens, dunno.
by drleviathan
Mon Dec 09, 2019 5:08 pm
Forum: General Bullet Physics Support and Feedback
Topic: curved trajectory(rolling Friction) fix for bullet in unity
Replies: 6
Views: 464

Re: curved trajectory(rolling Friction) fix for bullet in unity

Looking at the git commit history... A fix for rolling friction was committed in March 2019: commit 4c375588054dd3f99a1b0da00a68cc4a15b2136e Merge: 0c1faf18b 04441a29c Author: erwincoumans <erwin.coumans@gmail.com> Date: Sun Mar 3 20:56:12 2019 -0800 Merge pull request #2138 from erwincoumans/master...
by drleviathan
Sat Dec 07, 2019 4:06 pm
Forum: General Bullet Physics Support and Feedback
Topic: Detect collision object in visual object
Replies: 3
Views: 371

Re: Detect collision object in visual object

Here is one way to do it: (1) Derive a class from btGhostObject and copy the base addOverlappingObjectInternal() method into a modified override like this: class TriggerObject : puclic btGhostObject { public: void btGhostObject::addOverlappingObjectInternal(btBroadphaseProxy* otherProxy, btBroadphas...
by drleviathan
Wed Dec 04, 2019 4:53 pm
Forum: General Bullet Physics Support and Feedback
Topic: Find end position of object without intermediate calculations
Replies: 1
Views: 334

Re: Find end position of object without intermediate calculations

AFAIK Bullet does not have tools that would make your project trivial. However I could see how Bullet could help. Bullet can perform "sweeps" of objects with convex shapes to figure out where they first hit other non-moving objects when travelling along a linear path. So it would be possible to swee...
by drleviathan
Wed Nov 20, 2019 5:06 pm
Forum: General Bullet Physics Support and Feedback
Topic: Collision detection failed for Ellipsoid shapes
Replies: 7
Views: 787

Re: Collision detection failed for Ellipsoid shapes

The GJK algorithm uses a while(true) loop when trying to prove the origin is either inside or outside the Minkowski sum. The loop has exit cases for when poof is determined and a final "max iterations" exit case. Your configuration is looping "forever" and finally hitting max iterations. The relevan...
by drleviathan
Mon Nov 18, 2019 4:51 am
Forum: General Bullet Physics Support and Feedback
Topic: Is it possible to read the mass of a rigid body?
Replies: 1
Views: 300

Re: Is it possible to read the mass of a rigid body?

The btRigidBody class does not store mass. Instead it has a data member called m_inverseMass. This because it never actually multiplies by mass - it always divides instead.

You can use btRigidBody::getInvMass() to get the inverse mass, and then you can invert that to get mass.
by drleviathan
Mon Nov 11, 2019 4:39 pm
Forum: General Bullet Physics Support and Feedback
Topic: btCompoundShape performance hit (ragdoll hockey game)
Replies: 1
Views: 397

Re: btCompoundShape performance hit (ragdoll hockey game)

My experience has been btCompoundShape is indeed performance friendly, so it would be a mystery as to why you see such a dramatic performance change. You should obtain detailed timing measurements of a step to see where it is all being spent. The easiest way to do this is to call CProfileManager::du...
by drleviathan
Thu Nov 07, 2019 5:19 pm
Forum: General Bullet Physics Support and Feedback
Topic: Implementing a scissor model using constraints
Replies: 1
Views: 398

Re: Implementing a scissor model using constraints

First thing to try would be to use smaller substeps. Your code does this: _bWorld->stepSimulation(_timeline.previousFrameDuration(), 1); //_bWorld->stepSimulation(0.016); Which uses the default substep duration: one 1/60th of a second, and you only take one substep per step. What I would recommend i...