Search found 456 matches

by Flix
Sun Aug 23, 2009 8:30 am
Forum: General Bullet Physics Support and Feedback
Topic: btRigidBody/btGhostObject
Replies: 1
Views: 1584

Re: btRigidBody/btGhostObject

I think you shouldn't use ghost objects at all, but should implement a contact callback system. If you really need to store a list of colliding bodies, I suggest you extend from btRigidBody, add a list of btRigidBody* in it and a flag to enable collision monitoring (and a "upcast" method for the new...
by Flix
Sun Aug 23, 2009 8:18 am
Forum: General Bullet Physics Support and Feedback
Topic: Using btGhostObject
Replies: 3
Views: 6445

Re: Using btGhostObject

I forget the last question: Also, I would like to use btPairCachingGhostObject for real object collision rather than AABBs. Do these only get calculated after stepSimulation? I'd like to move the ghost object and look for collisions without any physics steps. Is this possible? I use this code for na...
by Flix
Sun Aug 23, 2009 8:11 am
Forum: General Bullet Physics Support and Feedback
Topic: Using btGhostObject
Replies: 3
Views: 6445

Re: Using btGhostObject

I don't have a final solution, but: It may be that the transform is wrong (many people just write: btTransform T;T.setOrigin(...); and think that the code is correct) or that the other objects in the world still needs to be created or that maybe some physic steps must already been performed before t...
by Flix
Sun Aug 23, 2009 8:03 am
Forum: General Bullet Physics Support and Feedback
Topic: Iterate over objects ina bounding box?
Replies: 15
Views: 13958

Re: Iterate over objects ina bounding box?

I've tested this code and it works for me (I just put it somewhere in the main loop): #define DEBUG_AABB_GHOST_OBJECT #ifdef DEBUG_AABB_GHOST_OBJECT { static btGhostObject* m_AABBghostObject = NULL; btDynamicsWorld* btWorld = getDynamicsWorld(); if (!m_AABBghostObject && btWorld) { if (!m_ghostPairC...
by Flix
Sun Aug 23, 2009 7:58 am
Forum: General Bullet Physics Support and Feedback
Topic: btMatrix3x3 getEuler returning nan
Replies: 8
Views: 7406

Re: btMatrix3x3 getEuler returning nan

Here are some methods that can be used as an alternative to btMatrix3x3::getEulerYPR(...) and btMatrix3x3::setEulerYPR(...). I'm not saying that they are better, they're just an alternative. I've ported them Bullet from <OgreMatrix3.cpp> (these are for yaw around Y, pitch around X and roll around Z,...
by Flix
Sun Aug 16, 2009 8:38 am
Forum: Applications, Games, Demos or Movies using Bullet
Topic: Collision Camera Demo (source code)
Replies: 1
Views: 7793

Re: Collision Camera Demo (source code)

Here I'm trying to attach a compiled version (requires VC++ 2008 redist. package, because I compiled it with the /MD option).

Unluckily I needed the .7z extension to include glut.dll and have a file size < 256 kiB.
by Flix
Sun Aug 16, 2009 8:23 am
Forum: Applications, Games, Demos or Movies using Bullet
Topic: Collision Camera Demo (source code)
Replies: 1
Views: 7793

Collision Camera Demo (source code)

Hi everybody, I've finally ported my semi-physic camera implementation (the angular part is not physically simulated) from my Bullet-Ogre environment to plain Bullet-OpenGL and I've added an attachment with the source code here. Hope you like it. The physic camera topic has already been discussed he...
by Flix
Sat Aug 15, 2009 8:15 am
Forum: General Bullet Physics Support and Feedback
Topic: Iterate over objects ina bounding box?
Replies: 15
Views: 13958

Re: Iterate over objects ina bounding box?

tomva wrote: That is, having the ghost objects in the world seems to impact the simulation (?), and in particular, some collisions seem to be missed. Well, I've implemented a (huge!) ghost object for frustum culling (with narrowphase collision detection) and I didn't suffer from any of these problem...
by Flix
Thu Aug 13, 2009 3:33 pm
Forum: General Bullet Physics Support and Feedback
Topic: btMatrix3x3 getEuler returning nan
Replies: 8
Views: 7406

Re: btMatrix3x3 getEuler returning nan

I recently got a problem with btMatrix3x3::setEuler(...). I know it's not exactly the argument of this thread, but maybe it's a part of the same topic. Basically I've found out that with this code: const btScalar yaw = btRadians(-145.0); const btScalar pitch = btRadians(85.0); const btScalar roll = ...
by Flix
Tue Aug 11, 2009 11:48 am
Forum: General Bullet Physics Support and Feedback
Topic: Should ray tests detect objects without contact response?
Replies: 2
Views: 1564

Re: Should ray tests detect objects without contact response?

It should be possible to exclude sensors and other objects using collision filter flags. You could assign the CollisionFilterGroups::SensorTrigger to sensors.
This was exactly what I was looking for! Thank you.
by Flix
Sun Aug 09, 2009 4:52 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to use Bullet to control a smooth camera...
Replies: 11
Views: 13345

Re: How to use Bullet to control a smooth camera...

Zeal wrote: Not sure how to do the rotation though... I dont want the user to pitch more than -90 to +90 degrees (yaw can go a full 360 degrees). How can I clamp these angles? sipickles added: This is something I am also interested in but have not yet resolved. Contrainsts perhaps? Well, I did not h...
by Flix
Sun Aug 09, 2009 8:19 am
Forum: General Bullet Physics Support and Feedback
Topic: Should ray tests detect objects without contact response?
Replies: 2
Views: 1564

Should ray tests detect objects without contact response?

Currently I'm using a custom ray callback "with exclusion" to exclude a particular object (in my case a frustum ghost object) from ray tests. Anyway I'm wondering if by default ray tests should exclude objects with NO_CONTACT_RESPONSE: I'm thinking of ray tests used for picking, raycast vehicles, an...
by Flix
Sun Aug 09, 2009 7:58 am
Forum: General Bullet Physics Support and Feedback
Topic: How to use Bullet to control a smooth camera...
Replies: 11
Views: 13345

Re: How to use Bullet to control a smooth camera...

sipickles wrote: Why not just use the linear and angular damping already provided by bullet? I already do it when I leave the input buttons, so that the camera stops in a very short time; but, when I move, the direction of the (80%) new velocitity can be of course different than the direction of the...
by Flix
Thu Aug 06, 2009 8:30 am
Forum: General Bullet Physics Support and Feedback
Topic: How to use Bullet to control a smooth camera...
Replies: 11
Views: 13345

Re: How to use Bullet to control a smooth camera...

sipickles wrote: You are setting the linear velocity directly, in a loop independent of bullets simulation steps. Yes, that's why I'm thinking of processing the input at the same Bullet frequency. Anyway for completeness: I calculate the "velocity delta" based on the "rendering" timeSinceLastFrame (...
by Flix
Thu Aug 06, 2009 8:11 am
Forum: General Bullet Physics Support and Feedback
Topic: Possible use of btGhostObject for frustum culling
Replies: 8
Views: 12843

Re: Possible use of btGhostObject for frustum culling

Erwin wrote: Frustum culling, as well as occlusion culling has been implemented using the btDbvtBroadphase acceleration structures. Check out Bullet/Extras/CDTestFramework Well, I had some trouble to compile the code, but now I've managed to do it (with a few changes), and in the next days I probabl...