Search found 849 matches

by drleviathan
Mon Mar 20, 2023 2:53 am
Forum: General Bullet Physics Support and Feedback
Topic: Getting and setting angular velocity in body space?
Replies: 7
Views: 96370

Re: Getting and setting angular velocity in body space?

For a rolling motorcycle the tilt of the vehicle is a balance between the torque from gravity and that of the centripetal force. In the case where the road is flat and the motorcycle has a forward speed and some tilt angle (from the vertical) then the torque balance relation looks like: (1) mass * s...
by drleviathan
Fri Mar 03, 2023 2:25 am
Forum: General Bullet Physics Support and Feedback
Topic: Kinematic objects colliding with dynamic objects very badly
Replies: 2
Views: 34059

Re: Kinematic objects colliding with dynamic objects very badly

What you want to do is to also set the velocities of the kinematic object correctly. Setting the velocities doesn't help move it to new transoforms, but it does help the collision system impart correct velocity on the dynamic object, allowing it to be knocked out of the way instead of getting into a...
by drleviathan
Mon Feb 27, 2023 4:03 pm
Forum: General Bullet Physics Support and Feedback
Topic: issue with softbody vs. custom concave shape
Replies: 1
Views: 29560

Re: issue with softbody vs. custom concave shape

Every system has its limits and you are adventuring outside those of the softbody collision system. Meanwhile, if you constantly invalidate the softbody cache (which was probably introduced to speed things up) then it would not be too surprising to suffer consequences of poor performance. Since you'...
by drleviathan
Tue Feb 21, 2023 5:47 pm
Forum: General Bullet Physics Support and Feedback
Topic: Reset/jump constraint to the initial position
Replies: 3
Views: 27929

Re: Reset/jump constraint to the initial position

Slamming the transform of the child object doesn't just work?

Code: Select all

child_body->setWordTransform(child_initial_transform);
by drleviathan
Mon Feb 20, 2023 5:07 am
Forum: General Bullet Physics Support and Feedback
Topic: Is it possible to create an ellipsoid shape in Bullet?
Replies: 1
Views: 25865

Re: Is it possible to create an ellipsoid shape in Bullet?

I've never personally used scaling on spheres however upon inspection of the code it looks like btSphereShape derives from btConvexInternalShape which has a m_localScaling data member. Try it and maybe it will work. Alternatively, you could use a btConvexHullShape . It is possible to set the collisi...
by drleviathan
Sun Feb 19, 2023 3:43 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: 36019

Re: Looking for help with settings and code to get my physics game correct

I should probably mention: one problem with slamming the linear velocity is it can override collision rebound effects and if the velocity blend is too strong it might lead to pushing the character through obstacle geometry (e.g. tunnel through a btBvhTriangleMeshShape terrain). To avoid this problem...
by drleviathan
Sun Feb 19, 2023 5:52 am
Forum: General Bullet Physics Support and Feedback
Topic: Looking for help with settings and code to get my physics game correct
Replies: 6
Views: 36019

Re: Looking for help with settings and code to get my physics game correct

After thinking about it some more I realized: if I just wanted a very simple rolling controller that pretty much always moved in the direction I wanted then I would blend toward a target linear velocity and then slam the angular velocity to always agree. In C++ it might look something like the code ...
by drleviathan
Mon Feb 06, 2023 3:56 pm
Forum: General Bullet Physics Support and Feedback
Topic: No performance difference between static and kinematic bodies?
Replies: 3
Views: 35247

Re: No performance difference between static and kinematic bodies?

The broadphase keeps track of the AABBs and also overlapping AABB pairs between distinct objects that might need narrowphase collision check to compute the contact points (if any). Ignoring narrowphase costs... there is overhead in: (1) knowing all the AABBs and overlaps and (2) adding new AABBs to ...
by drleviathan
Sun Feb 05, 2023 7:07 am
Forum: General Bullet Physics Support and Feedback
Topic: No performance difference between static and kinematic bodies?
Replies: 3
Views: 35247

Re: No performance difference between static and kinematic bodies?

If the kinematic objects are not active then they are not much more expensive than static. If you were to bounce a dynamic object around the kinematic objects then they would activate, but since they are being "animated" by btDefaultMotionState which does nothing, then they will be deactiv...
by drleviathan
Thu Feb 02, 2023 4:47 pm
Forum: General Bullet Physics Support and Feedback
Topic: Reset/jump constraint to the initial position
Replies: 3
Views: 27929

Re: Reset/jump constraint to the initial position

Let me repeat it back to you to make sure I understand: (1) You have two objects A and B connected by a constraint C . (2) You want to be able to reset the transforms of the two objects such that the constraint is satisfied (e.g. objects A and B are experiencing zero torque/force from the constraint...
by drleviathan
Sat Jan 21, 2023 6:17 am
Forum: General Bullet Physics Support and Feedback
Topic: extreme bouncing on btHeightfieldTerrainShape with small timesteps
Replies: 6
Views: 36765

Re: extreme bouncing on btHeightfieldTerrainShape with small timesteps

When I look at the implementation of btAdjustInternalEdgeContacts() I see this: void btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObjectWrapper* colObj0Wrap, const btCollisionObjectWrapper* colObj1Wrap, int partId0, int index0, int normalAdjustFlags) { //btAssert(colObj0->g...
by drleviathan
Fri Jan 20, 2023 11:50 pm
Forum: General Bullet Physics Support and Feedback
Topic: extreme bouncing on btHeightfieldTerrainShape with small timesteps
Replies: 6
Views: 36765

Re: extreme bouncing on btHeightfieldTerrainShape with small timesteps

I wonder if your problem isn't so much bad normals as it is interpenetration? This idea because I think the interpenetration resolution code can also introduce non-physical results that might look similar to glitches from bad normals. However, with such a small substep I doubt this could be the case...
by drleviathan
Fri Jan 20, 2023 7:31 pm
Forum: General Bullet Physics Support and Feedback
Topic: Is it possible to get the file of New FEM/Mass-spring deformable simulation?
Replies: 2
Views: 30275

Re: Is it possible to get the file of New FEM/Mass-spring deformable simulation?

In the video description are links to python and C++ examples. Start by looking at the deformable pybullet examples in the code repository?

https://github.com/bulletphysics/bullet ... t/examples
by drleviathan
Fri Jan 20, 2023 7:25 pm
Forum: General Bullet Physics Support and Feedback
Topic: extreme bouncing on btHeightfieldTerrainShape with small timesteps
Replies: 6
Views: 36765

Re: extreme bouncing on btHeightfieldTerrainShape with small timesteps

Is it really the edge normals? The sprung constraints between the fuselage and the wheels complicate matters. A quick way to verify it is caused by edge normals would be to have the box drag on a btStaticPlaneShape . If the problem goes away that would support the edge normals theory. Meanwhile, the...
by drleviathan
Wed Jan 18, 2023 7:16 am
Forum: General Bullet Physics Support and Feedback
Topic: How do I simulate falling dynamic objects?
Replies: 2
Views: 25150

Re: How do I simulate falling dynamic objects?

You're using pybullet but are asking the forums focused on C++ and the core Bullet libraries. You might try asking in the pybullet section . The only ideas I have are: Is the object properly activated? You say you "move the box to the edge of the platform" before starting the simulation, b...