Search found 849 matches
- Mon Jan 16, 2023 4:04 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Looking for help with settings and code to get my physics game correct
- Replies: 6
- Views: 42858
Re: Looking for help with settings and code to get my physics game correct
I don't use ammo.js however after downloading the repository and scanning the codebase I learned: it appears to support set/getResitution().
- Thu Jan 12, 2023 4:25 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Looking for help with settings and code to get my physics game correct
- Replies: 6
- Views: 42858
Re: Looking for help with settings and code to get my physics game correct
My advice is to avoid applying force/torque because it is complicated and difficult to tune. This because the amount of force depends on the mass and angular inertia of your object. Setting the velocities is the right way to go: it is much easier to implement because it works independently of mass a...
- Tue Jan 10, 2023 10:40 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Is it safe to retrieve objects transforms from one thread while stepSimulation is in other thread?
- Replies: 1
- Views: 47366
Re: Is it safe to retrieve objects transforms from one thread while stepSimulation is in other thread?
Actually body->getWorldTransform() is not necessarily the best way to do it. When your render rate is NOT the same as your simulation step rate you can get aliased results from body->getWorldTransform() which can sometimes produce a visible jitter in the motion of otherwise smoothly moving objects. ...
- Fri Jan 06, 2023 4:45 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: What are the units of force and mass and velocity?
- Replies: 2
- Views: 32150
Re: What are the units of force and mass and velocity?
I believe the units of force are Newtons: kg * m / sec^2 because the simulation step expects the duration to be in seconds. You can always use different units by scaling the substep duration and then tweaking your own mass and distance units accordingly. This can sometimes be handy when your world a...
- Fri Jan 06, 2023 4:21 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: compound shape / dynamic AABB tree question
- Replies: 1
- Views: 20203
Re: compound shape / dynamic AABB tree question
Yes, the dynamic AABB tree helps, even for static compound shapes, especially for compound shapes with many child shapes. It is used in the narrowphase collision calculation to cull the number of contact point candidates. The only reason to NOT enable the dynamic AABB tree would be for a compound sh...
- Mon Oct 17, 2022 3:33 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: [ammo] Problems with rigidity of sequential constraints
- Replies: 2
- Views: 3849
Re: [ammo] Problems with rigidity of sequential constraints
Yes, I think you are right: large ratios between the mass/inertia of constrained objects are contributing to the error of the constraint solution. I believe the problem still reproduces in the latest version of Bullet, but I haven't tested constraints in a while. Your example is probably using the b...
- Tue Oct 11, 2022 3:51 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Correct way to simulate joint friction and joint damping
- Replies: 1
- Views: 3821
Re: Correct way to simulate joint friction and joint damping
You're asking in the General Bullet Physics forum which is mostly about Bullet's core C++ library. You are more likely to get answers to your question if you ask in the PyBullet Support and Feedback forum.
- Mon Oct 10, 2022 2:22 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: why do btRigidBody objects land on ground on thin edge?
- Replies: 3
- Views: 47267
Re: why do btRigidBody objects land on ground on thin edge?
In Bullet dynamic objects will be deactivated if their linear and angular speeds are below some thresholds for at least 2 seconds. When the sleeping thresholds are too high, or when there is too much damping or energy loss (low restitution), it is possible for objects to balance long enough to be de...
- Sun Sep 11, 2022 2:38 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Synchronizing Client Server Physics
- Replies: 6
- Views: 22352
Re: Synchronizing Client Server Physics
The code comments offer some hints: ·///m_interpolationWorldTransform is used for CCD and interpolation ·///it can be either previous or future (predicted) transform ·btTransform m_interpolationWorldTransform; ·//those two are experimental: just added for bullet time effect, so you can still apply i...
- Tue Sep 06, 2022 2:38 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Squishy Physics?
- Replies: 12
- Views: 36398
Re: Squishy Physics?
Yes, you can reduce the fixedTimeStep . The declaration of btDiscreteDynamicsWorld::stepSimulation() is as follows: virtual int stepSimulation(btScalar timeStep, int maxSubSteps = 1, btScalar fixedTimeStep = btScalar(1.) / btScalar(60.)); The default fixedTimeStep is 1/60th of a second. If you suppl...
- Tue Aug 30, 2022 1:05 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Isuue in computing shortest distance between the cone and sphere
- Replies: 2
- Views: 3449
Re: Isuue in computing shortest distance between the cone and sphere
The comment on this line seems incorrect to me: tr[0].setOrigin(btVector3(0, 0, -1)); // centre of the base circle of the cone I would expect the transform supplied to the btGjkPairDetector::ClosestPointInput() to be that of the shape's origin (its center of mass (COM)), not to be that of a point on...
- Mon Aug 15, 2022 3:49 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: btCollisionWorld::convexSweepTest Performance Implications On Switch
- Replies: 1
- Views: 3529
Re: btCollisionWorld::convexSweepTest Performance Implications On Switch
I too have seen high CPU costs when sweeping against btBvhTriangleMeshShape . This is what I remember: (1) Make sure your mesh is actually using a Boundary Volume Hierarchy. The current version of the btBvhTriangleMeshShape ctor I'm seeing looks like this: btBvhTriangleMeshShape(btStridingMeshInterf...
- Fri Aug 12, 2022 1:56 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Any better documentation?
- Replies: 2
- Views: 4148
Re: Any better documentation?
According to the ammo.js github README there exists an IRC channel for discussion: Discussion takes place on IRC at #emscripten on Mozilla's server (irc.mozilla.org) You might be able to get help there. Since javascript must be downloaded before the page is fully working it is common practice to sho...
- Sat Aug 06, 2022 2:32 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Detecting collisions with btHeightfieldTerrainShape
- Replies: 4
- Views: 5918
Re: Detecting collisions with btHeightfieldTerrainShape
Yes, if you want to prevent the collisions in the first place you would need to look ahead, with ray-trace or some other mechanism. If you're running several hundred at once then the ray-trace seems like the cheapest approach. Rumor has it the btHeightfieldTerrainShape can get expensive if you make ...
- Fri Aug 05, 2022 10:41 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Detecting collisions with btHeightfieldTerrainShape
- Replies: 4
- Views: 5918
Re: Detecting collisions with btHeightfieldTerrainShape
The way collision works in Bullet is... The "broad-phase" provides collision candidates (e.g. pairs bodies with overlapping bounding boxes) to the "narrow-phase" which computes the details (contact manifold) of the collision. Your problem is... you are tapping into the output of ...