Search found 456 matches

by Flix
Thu Dec 03, 2009 11:41 am
Forum: General Bullet Physics Support and Feedback
Topic: Torque angles
Replies: 2
Views: 1243

Re: Torque angles

danisegarra wrote: First, I was using getEulerYPR function, and it works only in the cases that I doesn't rotate so much my object. After that I was looking for a function to get the angles (X, Y, Z) from a quaternion, but I can't find any function. You may find these posts useful: http://bulletphy...
by Flix
Tue Dec 01, 2009 2:51 pm
Forum: General Bullet Physics Support and Feedback
Topic: Getting rotation
Replies: 1
Views: 1274

Re: Getting rotation

This is probably an easy one: how can I get the rotation around one axis (the Y axis) ? Well, this is not a Bullet specific question, but a math question. Yo need to extract Euler angles from a quaternion. There are a lot of methods for doing it (and a lot of different conventions/combinations). So...
by Flix
Sun Nov 29, 2009 10:03 am
Forum: General Bullet Physics Support and Feedback
Topic: btConvexTriangleMeshShape Problem
Replies: 2
Views: 1999

Re: btConvexTriangleMeshShape Problem

GLPhysx wrote: I am trying to use btConvexTriangleMeshShape with a shape like a "+" [...] I simply switch for btGImpactMeshShape Well, of course, btBvhTriangleMeshShape is the best solution for (both convex and concave) static triangle meshes and if you need dynamic concave triangle meshes you must...
by Flix
Tue Nov 24, 2009 3:14 pm
Forum: General Bullet Physics Support and Feedback
Topic: Collision callbacks questions
Replies: 28
Views: 38824

Re: Collision callbacks questions

can anyone give a basic example of how to run through the contact manifolds? I assume the intention is to run through them before calling stepSimulation? Well, I posted an example (a modified BasicDemo) some time ago. You should be able to download it here (if this forum allows direct links to file...
by Flix
Thu Nov 05, 2009 2:31 pm
Forum: General Bullet Physics Support and Feedback
Topic: Possible use of btGhostObject for frustum culling
Replies: 8
Views: 12848

Re: Possible use of btGhostObject for frustum culling

Did you run into problems, or you just didn't spend much time trying to get it to work? Well, mainly the latter :?, but it was a bit more difficult to "extract" the occlusion query code from the Bullet/Extras/CDTestFramework demo, since it used an additional extern class (an oriented bounding box A...
by Flix
Tue Oct 20, 2009 1:21 pm
Forum: General Bullet Physics Support and Feedback
Topic: Possible use of btGhostObject for frustum culling
Replies: 8
Views: 12848

Re: Possible use of btGhostObject for frustum culling

GameQ wrote: What it this line? I found that I did not need it, and putting it in seemed to just slow me down. Code: m_dynamicsWorld->getDispatcher()->dispatchAllCollisionPairs(m_ghostObject->getOverlappingPairCache(), m_dynamicsWorld->getDispatchInfo(), m_dynamicsWorld->getDispatcher()); Nice found...
by Flix
Sun Oct 18, 2009 9:07 am
Forum: General Bullet Physics Support and Feedback
Topic: Possible use of btGhostObject for frustum culling
Replies: 8
Views: 12848

Re: Possible use of btGhostObject for frustum culling

GameQ wrote: I looked at Flix's code and ran it and it seems to work but not perfectly. Objects that are on the edges of the frustum will get culled out early making them blink in and out. No,no, the code works perfectly. That seems to happen just because I did not set the collision margin of the gh...
by Flix
Thu Oct 15, 2009 11:26 am
Forum: General Bullet Physics Support and Feedback
Topic: Collision callbacks questions
Replies: 28
Views: 38824

Re: Collision callbacks questions

To Fred_FS: Some of the objects have the flag "CF_NO_CONTACT_RESPONSE", but this is only to disable collision. Yes, CF_NO_CONTACT_RESPONSE should report manifold collision points, and I suppose you use a btRigidBody with it (not simply a btCollisionObject that could be skipped by your collision syst...
by Flix
Thu Oct 15, 2009 10:59 am
Forum: General Bullet Physics Support and Feedback
Topic: Contacts management....
Replies: 9
Views: 14439

Re: Contacts management....

richieturner wrote: Thats pretty much what I'm doing although I leave the averaging to the user to implement. For curiosity how do you do it? Do you send a collection of contact points to the user? Otherwise the user can still get all the points but in multiple callbacks (per physic frame), and it w...
by Flix
Tue Oct 13, 2009 1:37 pm
Forum: General Bullet Physics Support and Feedback
Topic: Contacts management....
Replies: 9
Views: 14439

Re: Contacts management....

I'm looking forward the future improvements of the Bullet library in this field. For the current version of Bullet I can contribute my implementation. It's far for being fast/efficient/perfect, but it's compliant with the code in the Bullet Demos and it's easy to integrate it in client code. There a...
by Flix
Tue Oct 13, 2009 1:20 pm
Forum: General Bullet Physics Support and Feedback
Topic: Collision callbacks questions
Replies: 28
Views: 38824

Re: Collision callbacks questions

To Fred_FS who wrote: I am using a very similar method to check for collisions but I get some problems with rigid bodys that are within other bodys. So I have something like a trigger which bekongs to another object, but in this trigger is another object. But this smaller object is not registered to...
by Flix
Tue Sep 29, 2009 1:31 pm
Forum: General Bullet Physics Support and Feedback
Topic: Determining which face is "looking up"
Replies: 4
Views: 2287

Re: Determining which face is "looking up"

Yep, I would do something similiar like this (never tested, so some adjustment should be done): btScalar maxValue = 0; int maxIndex = -1; for (int i = 0;i<6;i++) { const int side = i >= 3 ? i-3 : i; const bool negative = i>=3; btScalar value = dice->getWorldTransform().getBasis().getColumn(side).dot...
by Flix
Sun Sep 27, 2009 8:46 am
Forum: General Bullet Physics Support and Feedback
Topic: btMatrix3x3 getEuler returning nan
Replies: 8
Views: 7412

Re: btMatrix3x3 getEuler returning nan

I'm sorry for having resurrected this old thread again (and furthermore for answering to myself), but I wrote: There's a little problem with the license: Ogre is licensed LGPL, so I don't think that these methods (in <OgreMatrix3.cpp> there are plenty of other methods for all the possible axis combi...
by Flix
Thu Sep 03, 2009 2:19 pm
Forum: General Bullet Physics Support and Feedback
Topic: Implement a Character Controller
Replies: 7
Views: 3767

Re: Implement a Character Controller

I'm not an expert about the character controller, but I think that in that demo, only the kinematic character controller works (i.e. you shouldn't define DYNAMIC_CHARACTER_CONTROLLER). About the ghost object, it seems to be used to handle the collisions between the character and the other bodies (th...
by Flix
Sun Aug 30, 2009 8:45 am
Forum: General Bullet Physics Support and Feedback
Topic: btMatrix3x3 getEuler returning nan
Replies: 8
Views: 7412

Re: btMatrix3x3 getEuler returning nan

I'm sorry, in the code I provided in my last post there were two errors in the method ToEulerYXZ(...): btRadians(SIMD_HALF_PI) and btRadians(-SIMD_HALF_PI) are wrong in Bullet: they should simply be SIMD_HALF_PI and -SIMD_HALF_PI. With these corrections, these methods seem to work well in the follow...