## Search found 33 matches

Tue Aug 07, 2018 1:49 am
Forum: General Bullet Physics Support and Feedback
Topic: btHeightfieldTerrainShape going nuts
Replies: 8
Views: 3383

### Re: btHeightfieldTerrainShape going nuts

last time I had crazy jittering and wonky behavior on a heightfield, it turned out I was calling my GenerateTerrain() function twice and it was overwriting memory already allocated to bullet
Sat Jul 21, 2018 2:34 am
Forum: General Bullet Physics Support and Feedback
Topic: Squirrely dynamic bodies resting on flat static surface (video)
Replies: 18
Views: 3030

### Re: Squirrely dynamic bodies resting on flat static surface (video)

regarding bullet to opengl, I stole this from a forum somewhere glm::mat4 bulletToGlm(const btTransform& t) { glm::mat4 m(0); const btMatrix3x3& basis = t.getBasis(); // rotation for (int r = 0; r < 3; r++) { for (int c = 0; c < 3; c++) { m[c][r] = basis[r][c]; } } // traslation btVector3 origin = t...
Sat Jul 21, 2018 2:05 am
Forum: General Bullet Physics Support and Feedback
Topic: Is there a lower limit for velocity in Bullet?
Replies: 4
Views: 1202

### Re: Is there a lower limit for velocity in Bullet?

as far as I know you could also just do this once and be done with it:

Code: Select all

``````	myRigidBody->setActivationState(DISABLE_DEACTIVATION);
``````
Sat Jul 21, 2018 2:04 am
Forum: General Bullet Physics Support and Feedback
Topic: Squirrely dynamic bodies resting on flat static surface (video)
Replies: 18
Views: 3030

### Re: Squirrely dynamic bodies resting on flat static surface (video)

this is how I call stepSimulation (in both my hacky playground project, and my actual hobby game project) simTime = glfwGetTime(); dynamicsWorld->stepSimulation(deltaTime, 20, 1./100); dynamicsWorld->synchronizeMotionStates(); //if I remember correctly this was for the btRaycastVehicle's wheels if (...
Fri Jul 20, 2018 1:39 am
Forum: General Bullet Physics Support and Feedback
Topic: Squirrely dynamic bodies resting on flat static surface (video)
Replies: 18
Views: 3030

### Re: Squirrely dynamic bodies resting on flat static surface (video)

I have an "opengl / bullet physics playground" project in visual studio that I try new things in, so the code is very hacky and ugly, but this is what works normally for me: // Build the broadphase //btBroadphaseInterface* broadphase = new btAxisSweep3(btVector3(0,-3,0), btVector3(TERRAIN_SIZE,5,TER...
Thu Jul 19, 2018 2:34 am
Forum: General Bullet Physics Support and Feedback
Topic: how to avoid Ghost Objects with rayTest()
Replies: 7
Views: 1491

### Re: how to avoid Ghost Objects with rayTest()

update: above wasn't working so I gave it another shot using your suggestion + the tutorial on bulletphysics.org this is what I'm doing: enum collisionGroups // http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Collision_Filtering { COL_NOTHING = 0, //<Collide with nothing COL_GROUND = BIT(0), ...
Thu Jul 19, 2018 2:23 am
Forum: General Bullet Physics Support and Feedback
Topic: Squirrely dynamic bodies resting on flat static surface (video)
Replies: 18
Views: 3030

### Re: Squirrely dynamic bodies resting on flat static surface (video)

try this:

ground:
restitution = 0.0
friction = 1.0

objects:
restitution = 0.3
friction = 0.5

make sure you don't have sleeping disabled for the objects (make sure you did not myRigidBody->setActivationState(DISABLE_DEACTIVATION); )
Tue Jul 17, 2018 1:00 am
Forum: General Bullet Physics Support and Feedback
Topic: how to avoid Ghost Objects with rayTest()
Replies: 7
Views: 1491

### Re: how to avoid Ghost Objects with rayTest()

thanks for the mini-tutorial, it's hard to find good understandable info on this I think I've managed to sort it out for now but I will certainly add your example into the comments of my code for later use (I know I'll be back to it soon) - as a point of reference this is my simple little game: http...
Tue Jul 17, 2018 12:08 am
Forum: General Bullet Physics Support and Feedback
Topic: how to avoid Ghost Objects with rayTest()
Replies: 7
Views: 1491

### Re: how to avoid Ghost Objects with rayTest()

okay thanks, I'll try to figure this out two questions: - does this mean I now have to set collision groups on everything? never used them before and was hoping for an easy way to do what I want without them. Why is this only happening now that I set the ghost object to be a sensortrigger? - is ther...
Mon Jul 16, 2018 2:05 am
Forum: General Bullet Physics Support and Feedback
Topic: how to avoid Ghost Objects with rayTest()
Replies: 7
Views: 1491

### Re: how to avoid Ghost Objects with rayTest()

Thanks for the help - this makes sense -old post removed- Edit: with your help I was able to get rayTest to avoid the trigger ghost object, but now the ghost object is detecting the terrain in its collision manifold! (wasting CPU cycles) any tips on how I can avoid this? this is how I'm doing it now...
Fri Jul 13, 2018 2:38 am
Forum: General Bullet Physics Support and Feedback
Topic: how to avoid Ghost Objects with rayTest()
Replies: 7
Views: 1491

### how to avoid Ghost Objects with rayTest()

Hi, I've been reading through documentation and forum posts, and am having trouble figuring out how to do this: some of my units (turrets), have a cylinderShape ghost object around them that I'm using as a trigger to start targeting enemies inside of it This works perfectly, however now when I do a ...
Fri Jul 06, 2018 9:48 pm
Forum: General Bullet Physics Support and Feedback
Topic: Debug draw triangles
Replies: 3
Views: 2449

### Re: Debug draw triangles

I'm still very new to this, but an idea comes to mind: in btCollisionWorld.cpp , check out this area: /// for polyhedral shapes if (shape->isPolyhedral()) { btPolyhedralConvexShape* polyshape = (btPolyhedralConvexShape*) shape; int i; if (polyshape->getConvexPolyhedron()) { const btConvexPolyhedron*...
Fri Jul 06, 2018 7:22 pm
Forum: General Bullet Physics Support and Feedback
Replies: 0
Views: 981

Hi, I'm investigating whether there's a super easy way to have Bullet run multithreaded in my simple game I'm building, I've done investigating and found the following: - Lunkhound forked a version specifically for this around 2014. I see that he is still updating his fork - is this the version to u...
Tue Jun 19, 2018 1:54 am
Forum: General Bullet Physics Support and Feedback
Topic: vehicle wheels falling behind / gravity acting strange
Replies: 3
Views: 4692

### Re: vehicle wheels falling behind / gravity acting strange

edit: 7/4/2018 - this post was wrong, so I'm editing this in case any future person is here looking for a fix AFTER you call StepSimulation, and you're ready to draw your vehicle, do the following: vehicle->getRigidBody()->getMotionState()->getWorldTransform(buggyPosition); vehicle->updateWheelTrans...
Tue Jun 12, 2018 12:44 am
Forum: General Bullet Physics Support and Feedback
Topic: Assertion in btConvexShape.cpp
Replies: 3
Views: 1927

### Re: Assertion in btConvexShape.cpp

Hi, I know this is an old thread but I'm having the same issue, the strange thing is the behavior of Bullet is seemingly random one time when I run the program, everything will run perfectly the next time, the objects will fall to the ground and start jiggling forever the next time, I'll get this bt...