## Search found 56 matches

Thu Feb 16, 2012 10:09 pm
Forum: General Bullet Physics Support and Feedback
Topic: Division by zero in btConeTwistConstraint::calcAngleInfo2
Replies: 3
Views: 2598

### Re: Division by zero in btConeTwistConstraint::calcAngleInfo

Hello, Looks like there is no need to solve the swing limit in this case. So I added an additional check to btConeTwistConstraint::calcAngleInfo2() I tested it, it seems OK Here is the change (marked with //------------- ) btVector3 swingAxis = btVector3(qDeltaAB.x(), qDeltaAB.y(), qDeltaAB.z()); //...
Fri Nov 19, 2010 7:19 pm
Forum: General Bullet Physics Support and Feedback
Topic: 6DOF motors' forces and velocities depend on used timestep?
Replies: 10
Views: 6112

### Re: 6DOF motors' forces and velocities depend on used timest

Hello, The maxMotorForce value is actually sets a limit for impulse, applied during one timestep. So if you scale timestep dt you should scale maxMotorForce as well, e.g. if you had maxMotorForce == 0.1 for dt == 1/60 sec , you should set it to 0.01 for dt == 1/600 sec This maybe confusing, we'll th...
Wed Nov 03, 2010 9:24 pm
Forum: General Bullet Physics Support and Feedback
Topic: Using a constraint motor on a single body
Replies: 3
Views: 2546

### Re: Using a constraint motor on a single body

Hello, Actually all Bullet constraints always have 2 frames. In the case when constraint is attached to the world, the second frame is in the world coordinate system. Try the following code - it is a slider-like Generic6Dof constraint with linear motor. You can see that one frame is attached to the ...
Thu Oct 21, 2010 6:30 pm
Forum: General Bullet Physics Support and Feedback
Topic: Create a string with slider constraint
Replies: 1
Views: 1823

### Re: Create a string with slider constraint

Hello, Unfortunately spring is not supported for the slider joint for now. But you can use the 6DOF joint with spring, this will give the same effect Try the following code: { // create a generic 6DOF constraint with springs btTransform tr; tr.setIdentity(); tr.setOrigin(btVector3(btScalar(-10.), bt...
Tue May 18, 2010 7:07 pm
Forum: General Bullet Physics Support and Feedback
Topic: Pose matching with direct angular velocity control
Replies: 3
Views: 2457

### Re: Pose matching with direct angular velocity control

Hello, You may try to use btGeneric6DofSpringConstraint or derive your own hinge constraint from btHingeConstraint and use code like btGeneric6DofSpringConstraint::internalUpdateSprings() to update motor parameters on each step depending on pose matching that you need Basically targetVelocity adds s...
Tue Mar 23, 2010 12:27 am
Forum: General Bullet Physics Support and Feedback
Topic: Apply joint torques
Replies: 1
Views: 2282

### Re: Apply joint torques

Hello, Actually only ODE hinge joint have the addTorque(dReal torque) method. This method gets hinge axis ant applied torque to both bodies that are connected by hinge. Some other joints have addTorques(...) methods, specific for each joint Bullet has no specific function for each joint type, but it...
Fri Mar 19, 2010 11:38 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Distance constraint
Replies: 4
Views: 5754

### Re: Distance constraint

Hello, You are right, btPoint2PointConstraint is a ball joint So there is no distance constraint in Bullet for now. Fortunately it is easy to implement, like this: class btDistanceConstraint : public btPoint2PointConstraint { protected: btScalar m_distance; public: btDistanceConstraint(btRigidBody& ...
Fri Mar 19, 2010 8:06 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Distance constraint
Replies: 4
Views: 5754

### Re: Distance constraint

Hello, It seems that you could use btPoint2PointConstraint. For example, If pivotInA is located in the center of mass of bodyA (i.e. it is (0, 0, 0)) and pivotInB is located in the center of mass of bodyB (i.e. it is (0, 0, 0)) , then this joint will keep the distance between pivotInA and pivotInB t...
Fri Mar 19, 2010 7:52 pm
Forum: General Bullet Physics Support and Feedback
Topic: Joints feedback
Replies: 16
Views: 9644

### Re: Joints feedback

Hello again, Looks like ODE keeps the sum of constraint forces applied by joint to bodies in world space, and not for each constraint axis. http://opende.sourceforge.net/wiki/index.php/Manual_(Joint_Types_and_Functions) typedef struct dJointFeedback { dVector3 f1; // force that joint applies to body...
Fri Mar 19, 2010 6:42 pm
Forum: General Bullet Physics Support and Feedback
Topic: Joints feedback
Replies: 16
Views: 9644

### Re: Joints feedback

Hello,

OK, I understand now what is needed.
I'll add this possibility soon and keep you posted.

Thanks,
Roman
Wed Mar 17, 2010 7:27 pm
Forum: General Bullet Physics Support and Feedback
Topic: apply a force/impulse relative to a rigidbody
Replies: 7
Views: 11257

### Re: apply a force/impulse relative to a rigidbody

Hello,

Try this to avoid extra calculations:

Code: Select all

``````btVector3 relativeForce = btVector3(0,10,0);
btMatrix3x3& boxRot = boxRigidBody->getWorldTransform().getBasis();
btVector3 correctedForce = boxRot * relativeForce;
boxRigidBody->applyCentralForce(correctedForce);
``````
Hope this will help,
Roman
Wed Mar 17, 2010 7:09 pm
Forum: General Bullet Physics Support and Feedback
Topic: Joints feedback
Replies: 16
Views: 9644

### Re: Joints feedback

Hello, As of r2069 I've added several access functions to get velocities applied by solver to rigid body at one simulation step. These functions are defined as: const btVector3& btRigidBody::getDeltaLinearVelocity() const; const btVector3& btRigidBody::getDeltaAngularVelocity() const; const btVector...
Wed Mar 17, 2010 12:32 am
Forum: General Bullet Physics Support and Feedback
Topic: Joints feedback
Replies: 16
Views: 9644

### Re: Joints feedback

Hello,

Unfortunately for now there are no functions that return applied impulse in vector form.
However it looks like they could be added easily.
I'll do that soon and post a notice here.

Thanks,
Roman
Wed Mar 03, 2010 9:53 pm
Forum: General Bullet Physics Support and Feedback
Topic: newbie btGeneric6DofSpringConstraint question
Replies: 2
Views: 4188

### Re: newbie btGeneric6DofSpringConstraint question

Hello, FrameA and FrameB are constraint frames in local spaces A and B respectively Limits give the allowable range of movement if frameB in frameA space (or vice versa if useLinearReferenceFrameA == false) Try to play with the following snippet of code: { // create a generic 6DOF constraint with sp...
Wed Mar 03, 2010 9:06 pm
Forum: Physics authoring tools, serialization, standards and related topics
Topic: Pivot point offsets when using Dynamica in Maya x64
Replies: 3
Views: 4901

### Re: Pivot point offsets when using Dynamica in Maya x64

Hello, Unfortunately we cannot simply use existing transform for rigidBodyNode, because we should keep Maya shape node(and its transform) as well. It may be needed, for example, for high-quality rendering. Now rigid bodies have just very simplified polygonal rendering. Also we cannot just copy all d...