Search found 561 matches

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: 2
Views: 75

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

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: 4
Views: 133

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

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

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

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

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

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

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...
by drleviathan
Tue Oct 22, 2019 5:01 pm
Forum: General Bullet Physics Support and Feedback
Topic: Rolling Friction Scaling issues
Replies: 3
Views: 517

Re: Rolling Friction Scaling issues

If you have identified a bug in the rolling friction implementation, would you be able to supply a fix and submit a pull request (PR) against the bullet github repository? Alternatively, would you be able to explain the bug/fix so that someone else could make that PR?
by drleviathan
Thu Oct 17, 2019 3:58 pm
Forum: General Bullet Physics Support and Feedback
Topic: Creating a vehicle with btGeneric6DofSpring2Constraint questions
Replies: 2
Views: 366

Re: Creating a vehicle with btGeneric6DofSpring2Constraint questions

When I look at the btGeneric6DofSpring2Constraint code I see many parameters that can be changed. Most of these have default values assigned in the various helper class ctors, while the frameInA and frameInB parameters are required input to the btGeneric6DofSpring2Constrain ctor. Those frame paramet...
by drleviathan
Thu Sep 26, 2019 6:12 pm
Forum: General Bullet Physics Support and Feedback
Topic: Move kinematic object without affecting bodies on top
Replies: 1
Views: 603

Re: Move kinematic object without affecting bodies on top

When you move a kinematic object you don't need to give it non-zero velocities. If you do set its velocities non-zero it doesn't necessarily move forward in that way. Instead whenever the RigidBody needs to know its new transform external code must supply it (this is usually done via the MotionState...
by drleviathan
Fri Sep 20, 2019 3:26 pm
Forum: General Bullet Physics Support and Feedback
Topic: Moving a rigid object to mouse position
Replies: 3
Views: 772

Re: Moving a rigid object to mouse position

I realized after writing it up: the algorithm above is limited to rotation and scale transformations. It doesn't handle translations. For that you have to use 4D vectors where each vector looks like: v = <x, y, z, 1> and you would need four pairs of corresponding points to build the two 4x4 matrices...
by drleviathan
Thu Sep 19, 2019 8:37 pm
Forum: General Bullet Physics Support and Feedback
Topic: Angulating a rigidBody not known
Replies: 3
Views: 584

Re: Angulating a rigidBody not known

What you're asking about is called "inverse kinematics". You know the final destination and the problem is to determine the path to get there, or whether a valid path exists or not. I don't have the time or expertise to write up tutorial here. I recommend you research the subject to see what info yo...
by drleviathan
Thu Sep 19, 2019 4:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: Moving a rigid object to mouse position
Replies: 3
Views: 772

Re: Moving a rigid object to mouse position

This sounds a math question about how to transform from one frame to another. Given some 2D point on the screen (frameA) you want to compute the corresponding 3D point in the world-frame of the physics simulation (frameB). There exists a transform that does what you want such that: pointInB = transf...