Search found 48 matches

by bwelch
Mon Jan 13, 2014 9:44 pm
Forum: General Bullet Physics Support and Feedback
Topic: Computation of Minimal Distance and Penetration Depth
Replies: 1
Views: 2721

Re: Computation of Minimal Distance and Penetration Depth

I don't know about your specific case, but if it's anything like the collision callback function, you can just cast the btCollisionObjectWrapper as you need to. For example, in my project I have: bool btCallback(btManifoldPoint& cp,const btCollisionObjectWrapper* obj1,int id1,int index1,const bt...
by bwelch
Mon Jan 13, 2014 2:20 pm
Forum: General Bullet Physics Support and Feedback
Topic: Door knocked off hinge constraint by collisions
Replies: 18
Views: 18406

Re: Door knocked off hinge constraint by collisions

Unfortunately, I don't have much to suggest; I've been trying to solve the same problem with other constraint types and haven't had much luck. Try searching these forums for BT_CONSTRAINT_STOP_CFM and BT_CONSTRAINT_STOP_ERP. I don't fully understand what these parameters do and how they work, but pl...
by bwelch
Fri Jan 10, 2014 9:14 pm
Forum: General Bullet Physics Support and Feedback
Topic: btCollisionShape unresolved externals
Replies: 4
Views: 7976

Re: btCollisionShape unresolved externals

I've seen these errors a bunch while trying to integrate Bullet with some other code. Such a headache (especially since I've never dealt with MSVS until this project!). From my understanding, this occurs when you include a .h file that has a function prototype but the corresponding definition (usual...
by bwelch
Fri Jan 10, 2014 8:51 pm
Forum: General Bullet Physics Support and Feedback
Topic: Creating non-rectangular shapes w/ >4 sides
Replies: 8
Views: 7585

Re: Creating non-rectangular shapes w/ >4 sides

I found this thread after some searching http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=3303&hilit=shift+demo and tried to cannibalize the relevant parts in the hopes that I could get Bullet to figure out the center of mass for me: //convexhull hexahedron (not centered on the...
by bwelch
Fri Jan 10, 2014 4:50 pm
Forum: General Bullet Physics Support and Feedback
Topic: Creating non-rectangular shapes w/ >4 sides
Replies: 8
Views: 7585

Re: Creating non-rectangular shapes w/ >4 sides

Thanks, guys! I managed to build my dynamic hexahedron using btConvexHullShape. The center of gravity thing is kind of annoying, though... that's going to make placing my objects a headache. Do you know of any way to get Bullet to calculate a new center of gravity so I don't have to figure it out fo...
by bwelch
Thu Jan 09, 2014 10:06 pm
Forum: General Bullet Physics Support and Feedback
Topic: Creating non-rectangular shapes w/ >4 sides
Replies: 8
Views: 7585

Re: Creating non-rectangular shapes w/ >4 sides

Well, I found some problems with my self-determined triangle mesh, so I modified it a bit. This makes me really wish I knew how to get the mesh from the proprietary software I'm using... even getting the vertexes from 12 triangles is a pain! I made the changes below, but it still crashes in the same...
by bwelch
Thu Jan 09, 2014 5:31 pm
Forum: General Bullet Physics Support and Feedback
Topic: Creating non-rectangular shapes w/ >4 sides
Replies: 8
Views: 7585

Re: Creating non-rectangular shapes w/ >4 sides

The method posted above seems to work, but I think I'm doing something wrong somewhere because I can't get my shape to work if it's not static. I just stuck it into AppBasicDemo like this: //Triangle mesh hexahedron btTriangleMesh *mTriMesh = new btTriangleMesh(); // For whatever your source of tria...
by bwelch
Thu Jan 09, 2014 4:05 pm
Forum: General Bullet Physics Support and Feedback
Topic: Creating non-rectangular shapes w/ >4 sides
Replies: 8
Views: 7585

Re: Creating non-rectangular shapes w/ >4 sides

Thanks for that! I'll play around with it and see if it gives what I need. In the meantime, any other suggestions are welcome.
by bwelch
Thu Jan 09, 2014 3:41 pm
Forum: General Bullet Physics Support and Feedback
Topic: Creating non-rectangular shapes w/ >4 sides
Replies: 8
Views: 7585

Creating non-rectangular shapes w/ >4 sides

Hi all. I have what I think should be an easy question. How do I create polyhedrons in Bullet that aren't boxes? I'm trying to build a physics approximation of some complex geometry and it would be helpful to be able to make shapes like the one I've included (a hexahedron). Apologies if I've missed ...
by bwelch
Mon Jan 06, 2014 9:44 pm
Forum: General Bullet Physics Support and Feedback
Topic: Collision between 2 objects
Replies: 5
Views: 7133

Re: Collision between 2 objects

I know this is a month-old post, but in case others are wondering how to get collisions up and running somewhat quickly, this video tutorial helped me immensely: http://www.youtube.com/watch?v=YweNArzAHs4 This particular video deals with collisions, but starting with part 0, it walks you through Bul...
by bwelch
Mon Jan 06, 2014 8:40 pm
Forum: General Bullet Physics Support and Feedback
Topic: setWorldTransform() failed when apply on constraint (hinge)
Replies: 2
Views: 2555

Re: setWorldTransform() failed when apply on constraint (hin

I've only just begun working with Bullet, so I'm no expert, but it sounds like you could use some additional constraints to hold one of your bodies in place. Check out the Constraint Demo. It has a ton of examples of how you can fasten things in place. You may want to change your hinge constraint in...
by bwelch
Mon Dec 23, 2013 9:19 pm
Forum: General Bullet Physics Support and Feedback
Topic: Spring settings for a catapult
Replies: 4
Views: 5264

Re: Spring settings for a catapult

I managed to work out an inelegant but workable solution. I stuck a static block on top of the catapult base to physically stop the butt end of the launch arm when it goes too far. I also added a "latch" constraint between the launch arm and the base (just a 6Dof constraint with all degree...
by bwelch
Mon Dec 23, 2013 5:54 pm
Forum: General Bullet Physics Support and Feedback
Topic: Spring settings for a catapult
Replies: 4
Views: 5264

Re: Spring settings for a catapult

So, I figured out the angle settings from my previous post (I was right), but still have some questions. Here's the code I'm using for this example: //launchBeam * crossBeam frameInA = btTransform::getIdentity(); frameInA.setOrigin(btVector3(0, 0, scale*1.5)); frameInB = btTransform::getIdentity(); ...
by bwelch
Mon Dec 23, 2013 2:29 pm
Forum: General Bullet Physics Support and Feedback
Topic: making object stop using friction
Replies: 2
Views: 5282

Re: making object stop using friction

I'm no expert on Bullet, but in my reading I've come across some mention of rolling friction. Since you're using a sphere on a flat surface, maybe that's what you need?
by bwelch
Mon Dec 23, 2013 2:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: Spring settings for a catapult
Replies: 4
Views: 5264

Re: Spring settings for a catapult

Certainly not, but I'm asking if Bullet has any quirks that may differ from my pencil and paper, where I define everything. Starting simply, with something that should be easy to test, does my angular upper limit of 90 degrees correspond to a vertical catapult? In Bullet, is that limit a hard limit,...