Search found 733 matches

by drleviathan
Wed Sep 15, 2021 4:01 pm
Forum: General Bullet Physics Support and Feedback
Topic: Rigid body with child sensors
Replies: 5
Views: 223

Re: Rigid body with child sensors

Those collision filter groups are there for your convenience; they are completely optional. If you examine the Bullet source code you'll find they are declared in a header but never actually used anywhere except in an example. To get what you want I think you need to something like this before you a...
by drleviathan
Wed Sep 15, 2021 2:32 pm
Forum: General Bullet Physics Support and Feedback
Topic: Rigid body with child sensors
Replies: 5
Views: 223

Re: Rigid body with child sensors

To make a ghost object that follows a body I use an action. I derive GhostFollowsBody from the pure virtual base class btActionInterface and implement its updateAction() method like so: class GhostFollowsBody : public btActionInterface { btRigidBody* m_body; btGhostObject* m_ghost; public: void Ghos...
by drleviathan
Sat Sep 11, 2021 7:05 pm
Forum: General Bullet Physics Support and Feedback
Topic: btCompoundShape of convex hulls not rendering in BasicExample
Replies: 3
Views: 199

Re: btCompoundShape of convex hulls not rendering in BasicExample

Typically math libraries that have been optimized will NOT initialize object components to default values in the default ctor. This to avoid wasted CPU cycles for the cases where the default values are immediately overwritten. As such they require the Application developer to explicitly initialize. ...
by drleviathan
Sat Sep 11, 2021 6:34 pm
Forum: General Bullet Physics Support and Feedback
Topic: Object falls a third of its height through the ground
Replies: 9
Views: 491

Re: Object falls a third of its height through the ground

Setting the inverse inertia diagonal to zeros is fine: it produces an object that will never ever rotate from external forces, which is often what you want for a character. With dynamic characters I typically push them around with velocity adjustments, allow them to rotate about the vertical axis, b...
by drleviathan
Fri Sep 10, 2021 9:27 pm
Forum: General Bullet Physics Support and Feedback
Topic: btCompoundShape of convex hulls not rendering in BasicExample
Replies: 3
Views: 199

Re: btCompoundShape of convex hulls not rendering in BasicExample

In the btCompoundShape case your testModelTransform is left uninitialized when you pass it to createRigidBody(). Does the problem go away when you initialize it to something reasonable?
by drleviathan
Fri Sep 10, 2021 4:26 pm
Forum: General Bullet Physics Support and Feedback
Topic: No hit/collision on convexSweepTest using btBulletWorldImporter
Replies: 6
Views: 264

Re: No hit/collision on convexSweepTest using btBulletWorldImporter

It sounds like you are moving your object around kinematically: you set its position each step according to some external logic rather than allow the physics engine to integrate its motion forward in time. I don't believe CCD logic is triggered for objects that have been added to the World as kinema...
by drleviathan
Thu Sep 09, 2021 8:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: No hit/collision on convexSweepTest using btBulletWorldImporter
Replies: 6
Views: 264

Re: No hit/collision on convexSweepTest using btBulletWorldImporter

Perhaps you really are using CCD (which uses convexSweepTest() under the hood), I don't know. But your example snippet code showed you doing a manual convexSweepTest() so I thought maybe you were doing manual sweeps only rather than relying on the CCD sweeps. For the benefit of future readers I will...
by drleviathan
Thu Sep 09, 2021 2:16 pm
Forum: General Bullet Physics Support and Feedback
Topic: No hit/collision on convexSweepTest using btBulletWorldImporter
Replies: 6
Views: 264

Re: No hit/collision on convexSweepTest using btBulletWorldImporter

convexSweepTest() expects a btConvexShape pointer as first argument. You can only sweep convex shapes. When I count the BroadphaseNativeTypes enums in btBroadphaseProxy.h I see that 31 corresponds to COMPOUND_SHAPE_PROXYTYPE . But btCompoundShape derives from btCollisionShape not btConvexShape . It...
by drleviathan
Wed Sep 01, 2021 3:06 pm
Forum: General Bullet Physics Support and Feedback
Topic: Object falls a third of its height through the ground
Replies: 9
Views: 491

Re: Object falls a third of its height through the ground

If you're trying to make a tall think character always stand up maybe you should use the "zero inverse inertia tensor diagonal" trick. This would allow you to use whatever friction you want. In other words, if your character should only ever rotate about its local vertical Y-axis, then you...
by drleviathan
Mon Aug 30, 2021 2:54 pm
Forum: General Bullet Physics Support and Feedback
Topic: Object falls a third of its height through the ground
Replies: 9
Views: 491

Re: Object falls a third of its height through the ground

For stability your substep_period should be fixed. I believe the default behavior in Bullet is fixed step_period = 1/60 sec with 1 substep per step. Yes, for most applications the blend_timescale would be a constant. You would tweak it to get the responsiveness you want and then nail it down as a co...
by drleviathan
Sun Aug 29, 2021 3:59 pm
Forum: General Bullet Physics Support and Feedback
Topic: Object falls a third of its height through the ground
Replies: 9
Views: 491

Re: Object falls a third of its height through the ground

Slamming the linear velocity of a dynamic object to an arbitrary value is a Bad Idea in general because it could override velocities from collisions that would otherwise help resolve interpenetration. One way to avoid breaking the simulation is to use applyForce() instead of setLinearVelocity() beca...
by drleviathan
Sat Aug 28, 2021 9:30 pm
Forum: General Bullet Physics Support and Feedback
Topic: Testing a specific RB?
Replies: 7
Views: 584

Re: Testing a specific RB?

If you change the collision group/mask then you must remove it from the world and re-add it. This is because the group/mask information does not live at the btRigidBody but at its axis aligned bounding box (AABB) in the broadphase data structure which computes potential overlaps which are then passe...
by drleviathan
Sat Aug 28, 2021 4:17 pm
Forum: General Bullet Physics Support and Feedback
Topic: dropped object does not come to rest on longer edge
Replies: 2
Views: 169

Re: dropped object does not come to rest on longer edge

Due to the capsule's symmetry, the perfection of its orientation, and the simplicity of the Bullet deactivation logic I could see how this would happen. Here are some strategies you could try to reduce the likelihood bodies will be deactivated in a state of unstable balance. Dunno which will work be...
by drleviathan
Mon Aug 23, 2021 3:03 pm
Forum: General Bullet Physics Support and Feedback
Topic: g++ can't find bullet in ubuntu + vckpg install
Replies: 2
Views: 379

Re: g++ can't find bullet in ubuntu + vckpg install

What do you really want to do? If you just want to build Bullet C++ then I would recommend copying build_cmake_pybullet_double.sh to build_cmake.sh and then modifying that script to only build the parts you want. If vcpkg is important to the process then... I dunno. Maybe someone else here knows.
by drleviathan
Thu Aug 19, 2021 10:10 pm
Forum: General Bullet Physics Support and Feedback
Topic: Formation flying....
Replies: 4
Views: 440

Re: Formation flying....

Well... if the Player can drag the Rig around as fast as they want then there is no way to prevent very odd relative displacement between a Ship and its target point. Even with future prediction... ships will struggle to get into formation because the Rig will be unpredictable. This would be synonym...