Search found 839 matches
- Mon Mar 27, 2023 8:11 am
- Forum: General Bullet Physics Support and Feedback
- Topic: Getting and setting angular velocity in body space?
- Replies: 7
- Views: 190
Re: Getting and setting angular velocity in body space?
Sorry about that. I updated the link to what I hope is a publicly shared google photo. Yes, I guess I misunderstood your problem. I still might not understand it but I'll take another swing (let me know if this is in the right direction). If the vehicle is being steered directly... and you're trying...
- Mon Mar 27, 2023 4:31 am
- Forum: General Bullet Physics Support and Feedback
- Topic: Getting and setting angular velocity in body space?
- Replies: 7
- Views: 190
Re: Getting and setting angular velocity in body space?
Yes, I believe I made an error in my derivation. Let me try again from scratch... I tried again on paper and took a photo . Fig1 shows the leaning motorcycle. Fig2 shows the balance of forces which apply torque on the center of mass with focal point where the tire touches the road. Fig3 shows the ve...
- Sun Mar 26, 2023 6:39 am
- Forum: General Bullet Physics Support and Feedback
- Topic: Getting and setting angular velocity in body space?
- Replies: 7
- Views: 190
Re: Getting and setting angular velocity in body space?
I have fixed a few bugs in your code, and added a bunch of comments: btRigidBody *car = common.brickCars[a]->body; btTransform worldTransform = car->getWorldTransform(); worldTransform.setOrigin(btVector3(0,0,0)); btVector3 up = btVector3(0,1,0); // When we set 'normal' to be 'up' we are assuming th...
- Fri Mar 24, 2023 3:03 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Setting the center of mass does nothing except translate the model
- Replies: 4
- Views: 129
Re: Setting the center of mass does nothing except translate the model
Yes, the center of mass (COM) defines the local-frame origin which means: in order to shift the COM relative to the geometry you must shift the geometry instead. For this reason: btRigidBody::setCenterOfMassTransform() can only be understood to mean "set the COM transform in the world-frame&quo...
- Thu Mar 23, 2023 11:14 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Setting the center of mass does nothing except translate the model
- Replies: 4
- Views: 129
Re: Setting the center of mass does nothing except translate the model
Yeah you don't want to use btRigidBody::setCenterOfMassTransform() . That sets the world_transform of the object's center of mass and doesn't change the center of mass in the object's local-frame. The center of mass in the object's local-frame is, by definition, the origin of the shape geometry. Con...
- 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: 190
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...
- 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: 233
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...
- 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: 274
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'...
- 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: 453
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);
- 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: 173
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...
- 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: 659
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...
- 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: 659
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 ...
- 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: 309
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 ...
- 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: 309
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...
- 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: 453
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...