Search found 849 matches
- Mon Jun 29, 2015 1:23 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Bullet Physics with Animations
- Replies: 1
- Views: 2153
Re: Bullet Physics with Animations
Try giving the keyframed platform a velocity value that agrees with its motion. The velocity won't actually move the platform (it is moved via the keyframed animation of course), but it will make objects that collide with it respond as it if were moving.
- Mon Jun 29, 2015 1:51 am
- Forum: General Bullet Physics Support and Feedback
- Topic: Kinematic body motion -- how to make "smooth"?
- Replies: 13
- Views: 12977
Re: Kinematic body motion -- how to make "smooth"?
Kinematic objects are supposed to be controlled by a custom class derived from btMotionState . The DynamicsWorld will call the MotionState's getWorldTransform() every frame, expecting the MotionState to provide the new transform (and maybe setting the object's correct velocity). Setting the velocity...
- Thu Jun 25, 2015 4:46 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Kinematic body motion -- how to make "smooth"?
- Replies: 13
- Views: 12977
Re: Kinematic body motion -- how to make "smooth"?
The body's active/inactive state is influenced by its world-frame velocity, which never goes to zero when it is sitting on a moving kinematic object -- the DynamicsWorld will never allow the object to settle and it will always bounce and jitter a little bit. You might be able to do what you want usi...
- Thu Jun 25, 2015 4:29 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: How to change friction on a rigidbody
- Replies: 8
- Views: 6640
Re: How to change friction on a rigidbody
jorrit, I assume you're actually using Vim instead of Vi . There are plugins for Vim that would allow you to jump to function definitions and implementations, much like some of the shortcuts in an IDE. Finding these plugins and figuring out how they work is left as an exercise for the reader. Person...
- Sat Jun 20, 2015 7:23 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Is it possible to turn a Kinematic Rigidbody to a Dynamic?!
- Replies: 12
- Views: 7317
Re: Is it possible to turn a Kinematic Rigidbody to a Dynami
My experience has been that when I am seeing an inexplicable bug it always sensible explanation when I figure out what the real problem is.
I've had one other idea: does your object happen to have zero mass?
I've had one other idea: does your object happen to have zero mass?
- Sat Jun 20, 2015 2:34 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Is it possible to turn a Kinematic Rigidbody to a Dynamic?!
- Replies: 12
- Views: 7317
Re: Is it possible to turn a Kinematic Rigidbody to a Dynami
Another idea: when a btRigidBody is created it is set static by default (via the default btCollisionObject constructor from which btRigidBody derives). Perhaps you never cleared that flag and the object actually has both kinematic and static flags set? Try clearing both of flags whenever you try to ...
- Sat Jun 20, 2015 2:24 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Is it possible to turn a Kinematic Rigidbody to a Dynamic?!
- Replies: 12
- Views: 7317
Re: Is it possible to turn a Kinematic Rigidbody to a Dynami
Did you perhaps clear the object's gravity? Or maybe you didn't set the gravity of the world?
Try giving it some velocity after activating it as a test.
Try giving it some velocity after activating it as a test.
- Sat Jun 20, 2015 12:46 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Is it possible to turn a Kinematic Rigidbody to a Dynamic?!
- Replies: 12
- Views: 7317
Re: Is it possible to turn a Kinematic Rigidbody to a Dynami
Ah, I think your problem is that forceActivationState() doesn't reset the activation timer, so the object is getting deactivated almost immediately. Here is an excerpt from btCollisionObject.cpp: void btCollisionObject::forceActivationState(int newState) const { m_activationState1 = newState; } void...
- Sat Jun 20, 2015 4:34 am
- Forum: General Bullet Physics Support and Feedback
- Topic: Rotating an object around another object
- Replies: 3
- Views: 3358
Re: Rotating an object around another object
So you want bodyA to rotate around bodyB . You can slam bodyA 's position relative to its "parent" bodyB using a method very similar to my advice in this thread . If you want to avoid slamming positions and couple bodyA to bodyB with forces and velocities as johnsonalpha suggested then you...
- Sat Jun 20, 2015 4:12 am
- Forum: General Bullet Physics Support and Feedback
- Topic: rotating several btRigidBodies correctly
- Replies: 2
- Views: 3065
Re: rotating several btRigidBodies correctly
I don't think there is an simple way to do it, but you can manually compute the transform of each body. First you'd need to compute the relative transform of each body in its parent's local frame. Then after rotating the palm you would compute the new world-frame transforms down each chain of linked...
- Sat Jun 20, 2015 3:45 am
- Forum: General Bullet Physics Support and Feedback
- Topic: constraint problem
- Replies: 3
- Views: 3077
Re: constraint problem
It sounds like the reverse motion of the forklift is a result of a slight oscillation of the solution of the system of constraints and how that interacts with details of the contact points with the floor. I note that in the problem image the forklift's front wheels appear to be off the floor, so it ...
- Sat Jun 20, 2015 3:24 am
- Forum: General Bullet Physics Support and Feedback
- Topic: Is it possible to turn a Kinematic Rigidbody to a Dynamic?!
- Replies: 12
- Views: 7317
Re: Is it possible to turn a Kinematic Rigidbody to a Dynami
To clear just the CF_KINEMATIC_OBJECT flag you could do something like this:
Code: Select all
body0->setCollisionFlags(body0->getCollisionFlags() & ~btCollisionObject::CF_KINEMATIC_OBJECT);
- Fri Jun 19, 2015 9:01 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Energy inside the system
- Replies: 2
- Views: 2666
Re: Energy inside the system
No, I don't think there is functionality in Bullet to measure the potential energy of two objects that are being compressed. As far as I know the engine does not track internal stress forces at contact points during the simulation. Instead constraints are solved for new velocities and the internal f...
- Fri Jun 19, 2015 8:56 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Is it possible to turn a Kinematic Rigidbody to a Dynamic?!
- Replies: 12
- Views: 7317
Re: Is it possible to turn a Kinematic Rigidbody to a Dynami
You need to remove the [/b]CF_KINEMATIC_OBJECT[/b] flag to make the object dynamic. In other words, consider the implementation of btCollisionObject::isKinematicObject(): SIMD_FORCE_INLINE bool isKinematicObject() const { return (m_collisionFlags & CF_KINEMATIC_OBJECT) != 0; } BTW: Kinematic obj...
- Wed Jun 17, 2015 2:33 am
- Forum: General Bullet Physics Support and Feedback
- Topic: Y-Rotation of object parallel to cameraView
- Replies: 3
- Views: 2906
Re: Y-Rotation of object parallel to cameraView
My advice would be to avoid Euler angles and just compute the new rotation directly: Suppose you know both forward axes of your character projected onto the horizontal plane and normalized : oldCharacterForward (where it is now) and newCharacterForward (where you want it to be). You can compute the ...