Search found 849 matches

by drleviathan
Fri Sep 25, 2015 5:04 am
Forum: General Bullet Physics Support and Feedback
Topic: Collisions aren't automatic ?
Replies: 4
Views: 4089

Re: Collisions aren't automatic ?

A "kinematic" object is movable but moves in a non-physical way. That is, its motion is defined by some external source that is independent from the physics dynamics. Hence, kinematic will pass right through other kinematic and static objects... if the code that dictates their motion says ...
by drleviathan
Wed Sep 23, 2015 4:35 pm
Forum: General Bullet Physics Support and Feedback
Topic: Collisions aren't automatic ?
Replies: 4
Views: 4089

Re: Collisions aren't automatic ?

Yes, the character should collide with the tree automatically by default. There must be a bug in your program, but you have not supplied enough information for us to figure out why. You would have to supply some code or a more detailed description of how you build/move the character and tree. Some q...
by drleviathan
Tue Sep 22, 2015 12:52 am
Forum: General Bullet Physics Support and Feedback
Topic: Get Moved Vertices from a btConvexHullShape? [HELP]
Replies: 1
Views: 2453

Re: Get Moved Vertices from a btConvexHullShape? [HELP]

After reading the btConvexHullShape API I would guess the code you want might look something like this: const btTransform& transform = body->getWorldTransform(); int numPoints = hullShape->getNumPoints(); for (int i = 0; i < numPoints; ++i) { btVector transformedPoint = transform * hullShape->ge...
by drleviathan
Mon Sep 14, 2015 4:22 pm
Forum: General Bullet Physics Support and Feedback
Topic: Static Collision with Trimesh Shape Objects fails.
Replies: 4
Views: 4136

Re: Static Collision with Trimesh Shape Objects fails.

As per the wiki page about callbacks and triggers you should be able to use the btCollisionWorld::contactPairTest() method. I assume that path is not short circuited by the broadphase collision culling optimizations, but have not actually tried it myself.
by drleviathan
Fri Sep 11, 2015 3:28 pm
Forum: General Bullet Physics Support and Feedback
Topic: Static Collision with Trimesh Shape Objects fails.
Replies: 4
Views: 4136

Re: Static Collision with Trimesh Shape Objects fails.

As an optimization Bullet does not generate contact manifolds between static objects. You need to make at least one of them dynamic or keyframed. When using btBvhTriangleMeshShape the object MUST be static, so you'll have to use a different shape for any that you make keyframed. See this thread for ...
by drleviathan
Wed Sep 09, 2015 3:34 pm
Forum: General Bullet Physics Support and Feedback
Topic: Frictions between pellets and rotating bowl
Replies: 5
Views: 4494

Re: Frictions between pellets and rotating bowl

You also need to set the angular velocity of the kinematic bowl -- the physics engine won't update the bowl's rotation, but collisions with it will pick up velocities at the contact points. In fact, you don't even need to update the bowl's rotation to get the pellets to move -- just set its angular ...
by drleviathan
Mon Sep 07, 2015 6:03 pm
Forum: General Bullet Physics Support and Feedback
Topic: Always-Active Rigid Body Vibrating at "Rest"
Replies: 3
Views: 4357

Re: Always-Active Rigid Body Vibrating at "Rest"

When a ball at rest (inactive) gets hit by a moving object (active) the physics simulation will automatically activate the ball. Real activation triggers (i.e. collisions) in the physics engine are handled properly, however if you were driving the ball with an external trigger (e.g. keyboard) then y...
by drleviathan
Sun Sep 06, 2015 5:03 pm
Forum: General Bullet Physics Support and Feedback
Topic: Simulation 3d
Replies: 16
Views: 11982

Re: Simulation 3d

The simple reason is that I don't believe in perpetual motion machines so I discard such notions without inspection. However, in this specific case: (1) Any spin of the disk about its axis, if any, could only be introduced when the system changes speed about the vertical axis -- that is, when there ...
by drleviathan
Sat Sep 05, 2015 11:59 pm
Forum: General Bullet Physics Support and Feedback
Topic: Simulation 3d
Replies: 16
Views: 11982

Re: Simulation 3d

I don't believe it.
by drleviathan
Fri Sep 04, 2015 4:02 pm
Forum: General Bullet Physics Support and Feedback
Topic: XYZ rotation to align a plane onto a normal.
Replies: 3
Views: 4449

Re: XYZ rotation to align a plane onto a normal.

Given some normal vectorB there is an infinite number of rotations (and hence infinite combinations of Euler angles) that would rotate any reference vectorA to it -- there is no unique solution for the information you want. To compute a unique solution you need more information than just the normal,...
by drleviathan
Thu Sep 03, 2015 6:51 pm
Forum: General Bullet Physics Support and Feedback
Topic: XYZ rotation to align a plane onto a normal.
Replies: 3
Views: 4449

Re: XYZ rotation to align a plane onto a normal.

What do you really want to do? Are you just using the RX , RY , and RZ values to define a plane? If so then the Euler angles are pnot the most useful info to harvest. A plane can be defined by any point on the plane and a normal. The result of the raycast provides these for you --> no need to do Eul...
by drleviathan
Thu Sep 03, 2015 5:42 am
Forum: General Bullet Physics Support and Feedback
Topic: btMultibody instability
Replies: 7
Views: 6763

Re: btMultibody instability

The problem, I think, is that you're submitting float s to some class constructors that explicitly require double . The way to avoid this problem is to never use the float type directly and to never use float literals (e.g. 1.0f or 1.23e4f). Instead always use btScalar and always explicitly cast any...
by drleviathan
Thu Sep 03, 2015 5:26 am
Forum: General Bullet Physics Support and Feedback
Topic: Always-Active Rigid Body Vibrating at "Rest"
Replies: 3
Views: 4357

Re: Always-Active Rigid Body Vibrating at "Rest"

Even though it is the main game entity it should be possible to make it do what you want while allowing it to go inactive in the physics simulation. I would recommend figuring out how to make your game without resorting to setActivationState(DISABLE_DEACTIVATION) . You can activate it directly using...
by drleviathan
Wed Sep 02, 2015 6:29 am
Forum: General Bullet Physics Support and Feedback
Topic: Simulation 3d
Replies: 16
Views: 11982

Re: Simulation 3d

After thinking about this during my morning commute I decided that a conservation of momentum treatment just won't work. Although the system is driven by an external torque (momentum isn't conserved) I thought maybe the conservation rules could be applied along specific axes -- nope. Then I looked a...
by drleviathan
Tue Sep 01, 2015 6:00 am
Forum: General Bullet Physics Support and Feedback
Topic: Advice on how to approach this?
Replies: 4
Views: 3389

Re: Advice on how to approach this?

One way to simulate this system would be to use verlet constraints . Each big sphere could be simulated as a large collection of smaller spheres connected by springs. The advantage of such an approach would be: (1) The algorithm is relatively simple to implement. (2) It is stable. (3) It can achieve...