Search found 48 matches

by robagar
Mon Feb 28, 2011 10:34 pm
Forum: General Bullet Physics Support and Feedback
Topic: Ogre + Bullet simple collision detection
Replies: 2
Views: 3715

Re: Ogre + Bullet simple collision detection

Um, in the transform.setOrigin calls you have two .x's
by robagar
Thu Sep 23, 2010 4:46 am
Forum: General Bullet Physics Support and Feedback
Topic: Changing gravity depending on position.
Replies: 3
Views: 4443

Re: Changing gravity depending on position.

How about modifying btRigidBody::applyGravity() in Bullet itself, and submitting a patch? Perhaps with #ifdefs so the default is constant gravity like it is now.
by robagar
Tue Sep 21, 2010 12:08 pm
Forum: General Bullet Physics Support and Feedback
Topic: Limit softbody deformations
Replies: 10
Views: 14242

Re: Limit softbody deformations

hey ca$per - FWIW I'm doing something very similar with softbody sails on a small sailing boat , and I've hit the same problems. 1. rigid bodies penetrate soft bodies (ie the collision response is not strong enough) 2. soft bodies are way too stretchy, like very thin rubber, regardless of the materi...
by robagar
Tue Aug 03, 2010 2:43 am
Forum: General Bullet Physics Support and Feedback
Topic: applytorque about specific point?
Replies: 6
Views: 6463

Re: applytorque about specific point?

Thought I'd just post my code for doing that ... btTransform frameInA; frameInA.setIdentity(); frameInA.setOrigin(position_of_B_in_A_local_coordinates); // attachment point for B is at its center of gravity btTransform frameInB; frameInB.setIdentity(); btGeneric6DofConstraint* pConstraint = new btGe...
by robagar
Wed Jul 28, 2010 11:38 pm
Forum: General Bullet Physics Support and Feedback
Topic: Path trajectory
Replies: 2
Views: 3615

Re: Path trajectory

If the only force acting on the cannon ball is gravity (ie no air resistance), the trajectory will be a parabola which you can work out the trajectory mathematically - google "balistic trajectory".

Whether that matches the trajectory Bullet comes up with is another thing entirely...
by robagar
Wed Jul 28, 2010 11:29 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to check when an object is stationary
Replies: 2
Views: 3231

Re: How to check when an object is stationary

btCollisionObject::isActive() will tell you if something's been put to sleep...
by robagar
Wed Jul 28, 2010 11:26 pm
Forum: General Bullet Physics Support and Feedback
Topic: btRigidBody::upcast() is a downcast?
Replies: 6
Views: 7134

Re: btRigidBody::upcast() is a downcast?

yup, it's the wrong way round. But it kind of makes sense as opposed to going "up" towards the "base" :?
by robagar
Thu Jul 22, 2010 2:46 am
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Volume of the Intersection Between a Sphere and a Cube?
Replies: 3
Views: 7011

Re: Volume of the Intersection Between a Sphere and a Cube?

Doing boolean operations on 3D shapes like that is known as "constructive solid geometry" (see the pic http://en.wikipedia.org/wiki/Constructive_solid_geometry ). I've not used any of them myself, but there are a few CSG libraries aboutyou could look at, like Carve (http://carve-csg.com/) ...
by robagar
Wed Jul 21, 2010 2:10 am
Forum: General Bullet Physics Support and Feedback
Topic: Documentation
Replies: 2
Views: 3034

Re: Documentation

It's a known problem - see the sticky above and issue #42 . There are plenty of people willing to write some docs (myself included, for the basic stuff), but it needs someone with SVN commit access to really make it happen. In the mean time, you're best off reading the source code. It's well written...
by robagar
Mon Jul 19, 2010 9:21 pm
Forum: General Bullet Physics Support and Feedback
Topic: Collision shape does not rotate
Replies: 3
Views: 4131

Re: Collision shape does not rotate

Also, that's not how motion states work. The documentation doesn't explain it terribly well, but basically the get and set functions are called by Bullet to update your objects. getWorldTransform is called by Bullet to query the position & orientation of an object (for normal non-kinematic bodie...
by robagar
Sun Jul 18, 2010 7:55 am
Forum: General Bullet Physics Support and Feedback
Topic: trajectory of a missile
Replies: 1
Views: 3001

Re: trajectory of a missile

I'd guess a missile's nose turns not because of gravity, but because the fins at the back apply a force if the missile's not flying straight along it's axis (like an arrow). Calculate the missile's velocity in local coordinates, and add a force to the tail which acts against the x & y components...
by robagar
Wed Jul 14, 2010 5:00 am
Forum: General Bullet Physics Support and Feedback
Topic: Bullet wiki or documentation repo?
Replies: 67
Views: 105528

Re: Bullet wiki or documentation repo?

Yup, agreed. Bullet is severely let down by it's lack of (inline) documentation. The class and variable naming is good so you can usually work things out by reading the code (apart from the softbody code, which is let down by lack of documentation and one letter variable names :? ) It's a shame, 'co...
by robagar
Tue Jul 13, 2010 2:43 am
Forum: Applications, Games, Demos or Movies using Bullet
Topic: Sailing demo
Replies: 0
Views: 5064

Sailing demo

http://www.youtube.com/watch?v=9t-v1rh9Dhg A boat with a softbody clothg sail being blown downwind. The rudder is rigged to counteract the torque from the sail (more or less). The heavy keel keeps the boat from capsizing, and also resists sideways movement by applying drag forces. Next - add proper ...
by robagar
Thu Jul 08, 2010 10:38 pm
Forum: General Bullet Physics Support and Feedback
Topic: non physical behaviour of rotation
Replies: 9
Views: 8175

Re: non physical behaviour of rotation

or even just

Code: Select all

btVector3 anchorPos = d_object->getWorldTransform() * d_localAnchor
sorry, I was thinking in Ogre terms, which keeps the orientation & position separately :oops:
by robagar
Thu Jul 08, 2010 8:54 am
Forum: General Bullet Physics Support and Feedback
Topic: non physical behaviour of rotation
Replies: 9
Views: 8175

Re: non physical behaviour of rotation

another thing you could try is an alternative way of getting the anchor position in world space, like this btVector3 anchorPos = (d_object->getWorldTransform().getBasis() * d_localAnchor) + d_object->getCenterOfMassPosition(); .. although the way you're explicitly applying the orientation rotation s...