Search found 764 matches

by drleviathan
Thu Jan 13, 2022 3:52 am
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7523

Re: Jittering and shaking when moving a rigidBody

I watched the video. It looks like you're driving the camera and pushing the spaceship to follow. That is, I see the camera movement leading the spaceship, and there was one point where the ship lagged the camera by a lot. I would conclude: you're moving the camera using different timesteps than the...
by drleviathan
Tue Jan 11, 2022 9:07 pm
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7523

Re: Jittering and shaking when moving a rigidBody

Your quaternion harvesting looks odd to me but if your spaceship expects a glm::vec4 with the unnormalized axis as the xyz part and the angle of rotation (in radians) for the w part then... I guess it is ok. static glm::vec4 Rotation; auto q = worldTrans.getRotation(); btVector3 v = q.getAxis(); Rot...
by drleviathan
Mon Jan 10, 2022 5:32 am
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7523

Re: Jittering and shaking when moving a rigidBody

Here is an example minimal custom MotionState . This implementation assumes you have a GameObject class outside of Bullet which knows how to get/set its transform. If your Application is using some other math library (e.g. GLM) outside of the Bullet simulation then you will have to embed transcripti...
by drleviathan
Fri Jan 07, 2022 8:02 pm
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7523

Re: Jittering and shaking when moving a rigidBody

The delcaration for btDiscreteDynamicsWorld::stepSimulation() looks like this: ·///if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's ·virtual int stepSimulation(btScalar timeStep, int maxSubSteps = 1, btScalar fixedTimeStep = btScalar(1.) / btScalar(60.)); It returns the number ...
by drleviathan
Thu Jan 06, 2022 3:47 am
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7523

Re: Jittering and shaking when moving a rigidBody

For the record: I'm in favor of poking the velocity instead of using applyForce(). A properly implemented velocity algorithm can be agnostic about the object's mass. As to the jitter: Are you using MotionState's to get a body's transform or do you harvest directly from the body? The MotionState API ...
by drleviathan
Mon Dec 27, 2021 3:08 pm
Forum: General Bullet Physics Support and Feedback
Topic: Determining damage from impacts?
Replies: 2
Views: 219

Re: Determining damage from impacts?

I don't know of a simple way. I think some of the details of collisions, such as internal tension forces between bodies, are never even computed. Instead a collection of contact constraints that try to prevent rigid bodies from intepenetrating are iteratively "solved" using linear algebra ...
by drleviathan
Fri Dec 17, 2021 5:41 am
Forum: General Bullet Physics Support and Feedback
Topic: Jitter - anything else I can do?
Replies: 5
Views: 537

Re: Jitter - anything else I can do?

It is a tenant of the Bullet API: if you give the World an Action then the action's updateAction(world, delta_time) method will be called once per substep. All of that happens inside the stepSimulation() which is usually called explicitly by your App's code. If LibGdx exposes the Action interface th...
by drleviathan
Thu Dec 16, 2021 3:50 pm
Forum: General Bullet Physics Support and Feedback
Topic: Jitter - anything else I can do?
Replies: 5
Views: 537

Re: Jitter - anything else I can do?

There is remainder time between a step and the integer number of substeps and Bullet will supply an extrapolated transform to MotionState::setWorldTransform() which incorporates that remainder. I believe this happens every substep rather than every step. So yes, in theory this is supposed to make fo...
by drleviathan
Fri Nov 26, 2021 5:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: Linux, make fails
Replies: 3
Views: 1116

Re: Linux, make fails

For best results: use the cmake. I meant: don't use the premake build scripts: stick with cmake . Hrm... I'm not seeing any Test_BulletCollision targets in the cmake configs. When I hunt around I find in test/collision/CMakeLists.txt there is a Test_Collision target. What version of Bullet do you t...
by drleviathan
Fri Nov 26, 2021 4:28 pm
Forum: General Bullet Physics Support and Feedback
Topic: btGeneric6DofConstraint - Weld/Parent
Replies: 6
Views: 751

Re: btGeneric6DofConstraint - Weld/Parent

You could try taking smaller substeps. The more times the simulation "solves" a system of constraints the more rigid it will be. This is fundamentally why a system of constraints gets wobbly: the Bullet constraint solver will only iterate so many times before it concludes "good enough...
by drleviathan
Fri Nov 26, 2021 4:05 pm
Forum: General Bullet Physics Support and Feedback
Topic: About the size of triangles and objects
Replies: 5
Views: 664

Re: About the size of triangles and objects

It is OK for Bullet bodies to larger than 100 units. In particular: it is OK for static or relatively slow kinematic objects to be very large (100s or 1000s of units) however be careful when making very large (>100 units) dynamic objects or fast moving kinematic . Basically, if you have very large f...
by drleviathan
Thu Nov 25, 2021 4:47 pm
Forum: General Bullet Physics Support and Feedback
Topic: About the size of triangles and objects
Replies: 5
Views: 664

Re: About the size of triangles and objects

You definitely don't want to use shapes as small as 0.01 meters. Bullet is effectively hard-coded to work best for dynamic objects on the order of a few tenths of a meter to a few tens of meters. That is: assumptions are made in the default parameters and logic that make it problematic to wander out...
by drleviathan
Sat Nov 20, 2021 3:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: Toroidal Universe, as found in Asteroids (1978)
Replies: 1
Views: 337

Re: Toroidal Universe, as found in Asteroids (1978)

Wrap around boundary conditions are not a feature of Bullet. Not that it isn't possible... but I can't think of any easy way to do it. All of the schemes I come up with involve complex negotiations between proxy objects. In other words, you wouldn't really have one object spanning the top and bottom...
by drleviathan
Fri Nov 19, 2021 6:58 am
Forum: General Bullet Physics Support and Feedback
Topic: Squishy Physics?
Replies: 10
Views: 958

Re: Squishy Physics?

Re: pile of objects... you are putting too many into a state of penetration. The penetration resolution logic works well for two overlapping objects but less well for N simultaneously overlapping objects, because it tries to separate them by pairs and alternate pairs can work against each other. You...
by drleviathan
Thu Nov 18, 2021 2:54 pm
Forum: General Bullet Physics Support and Feedback
Topic: Squishy Physics?
Replies: 10
Views: 958

Re: Squishy Physics?

So this means, if you don't override the two optional arguments then your steps will only ever do one substep at 1/60th of a second. This is fine if you call stepSimulation() with timeStep < substep: on some calls the stepSimulation will do nothing but accumulate time and then once it has a full su...