Search found 22 matches

by EddieBytes
Sun Feb 12, 2012 8:23 am
Forum: General Bullet Physics Support and Feedback
Topic: Collision between btCapsuleShape and btBvhTriangleMeshShape
Replies: 4
Views: 3331

Re: Collision between btCapsuleShape and btBvhTriangleMeshSh

I found the cause. I didn't calculate the local inertia for the terrain. mCollisionShape->calculateLocalInertia(mass, fallInertia); I probably don't understand local inertia right. What is it and why is it needed for static objects? Can't find anything in the documentation explaining it. Also, it's ...
by EddieBytes
Sun Feb 12, 2012 8:06 am
Forum: General Bullet Physics Support and Feedback
Topic: Collision between btCapsuleShape and btBvhTriangleMeshShape
Replies: 4
Views: 3331

Re: Collision between btCapsuleShape and btBvhTriangleMeshSh

Is there anything else that might cause this peculiar behavior?
by EddieBytes
Sat Feb 11, 2012 8:13 pm
Forum: General Bullet Physics Support and Feedback
Topic: Collision between btCapsuleShape and btBvhTriangleMeshShape
Replies: 4
Views: 3331

Re: Collision between btCapsuleShape and btBvhTriangleMeshSh

Thanks! Your suspicions might be correct. I printed to my debug output the values of getCollisionFlags for each rigid body. My character's body printed 0 and the terrain rigid body printed 1. But that's also true on Debug, not only Release, yet they still collide correctly. Nonetheless I used mRigid...
by EddieBytes
Sat Feb 11, 2012 3:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: Collision between btCapsuleShape and btBvhTriangleMeshShape
Replies: 4
Views: 3331

Collision between btCapsuleShape and btBvhTriangleMeshShape

Using bullet 2.79. I have two objects: my character is the btCapsuleShape, and a 2D terrain (my game is a platformer) is a btBvhTriangleMeshShape. The above collision works fine in Debug, however on Release the character just falls right through the terrain. Collisions get detected, my handler for c...
by EddieBytes
Sun Sep 04, 2011 1:14 pm
Forum: General Bullet Physics Support and Feedback
Topic: Quick questions about btCompoundShape
Replies: 1
Views: 1179

Re: Quick questions about btCompoundShape

1) If I used a btCompoundShape to group all those btBox2DShapes into a single shape within a rigid body, would that speed things up? 2) Can another rigid body reside inside the aabb of such a compound shape? For example, if a cave was a single btCompoundShape made of such boxes, could a separate ri...
by EddieBytes
Sun Sep 04, 2011 12:24 pm
Forum: General Bullet Physics Support and Feedback
Topic: Quick questions about btCompoundShape
Replies: 1
Views: 1179

Quick questions about btCompoundShape

I have about 10.000 blocks forming the terrain of a 2D game. See image here Each block is a btBox2DShape and a btRigidBody of its own. Due to this, the game's fps bogs down to a lousy 4 frames per second or worse. 1) If I used a btCompoundShape to group all those btBox2DShapes into a single shape wi...
by EddieBytes
Thu Jul 28, 2011 8:16 pm
Forum: General Bullet Physics Support and Feedback
Topic: Object stuck in the floor.
Replies: 21
Views: 9264

Re: Object stuck in the floor.

This is bad. This is very bad. How am I supposed to make a game in which the character walks like he's on springs... I really need a workaround for this, there must be something, anything. Surely I'm not the only one facing this problem, I'm sure other people have made 2D games using bullet...
by EddieBytes
Thu Jul 28, 2011 1:44 pm
Forum: General Bullet Physics Support and Feedback
Topic: Object stuck in the floor.
Replies: 21
Views: 9264

Re: Object stuck in the floor.

For each block I have a class instance, holding information about that block, and the block's btRigidBody. If the fracturable merges touching rigid bodyes, then the pointer to my rigid body the block holds becomes invalid, am I correct? And what if I have many blocks? They are not dynamic, so I do n...
by EddieBytes
Wed Jul 27, 2011 4:08 am
Forum: General Bullet Physics Support and Feedback
Topic: Somes troubles with bullet update
Replies: 3
Views: 1332

Re: Somes troubles with bullet update

Here is my call, it may or may not work for you: mDynamicsWorld->stepSimulation(timeSinceLastTime / 1000., 7, (btScalar)1./120); make sure your fractions evaluate to a floating point number by making one of the fraction's terms float. Otherwise they will truncate to zero. I looked at your link but I...
by EddieBytes
Tue Jul 26, 2011 3:47 pm
Forum: General Bullet Physics Support and Feedback
Topic: Object stuck in the floor.
Replies: 21
Views: 9264

Re: Object stuck in the floor.

how do you move your player? impulses or kinematic object? If impulses/forces I suggest you to add some force upward. Another way to workaround this is to change player collision object to sphere or capsule I'm using forces. Yeah, the capsule approached occurred to me earlier, but it feels like a h...
by EddieBytes
Tue Jul 26, 2011 12:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: Object stuck in the floor.
Replies: 21
Views: 9264

Re: Object stuck in the floor.

Come on, really? Has no one else encountered this before? :cry:
by EddieBytes
Tue Jul 26, 2011 5:26 am
Forum: General Bullet Physics Support and Feedback
Topic: Somes troubles with bullet update
Replies: 3
Views: 1332

Re: Somes troubles with bullet update

I believe low framerate is the cause for both your issues, since your simulation depends on the framerate. It shouldn't. I think your stepSimulation parameters are not correct. Read this article and adjust your maxSubsteps and fixedTimeStep parameters in your stepSimulation call: http://bulletphysic...
by EddieBytes
Tue Jul 26, 2011 5:22 am
Forum: General Bullet Physics Support and Feedback
Topic: Object stuck in the floor.
Replies: 21
Views: 9264

Re: Object stuck in the floor.

DAMN IT!
I initially thought friction between block and character caused the character to not pop out if it was penetrating the block while touching the adjacent block, like I explain in my previous post. So I set the block's friction to 0. The behavior still occurs.

:x :x :x :x
by EddieBytes
Tue Jul 26, 2011 5:04 am
Forum: General Bullet Physics Support and Feedback
Topic: Object stuck in the floor.
Replies: 21
Views: 9264

Re: Object stuck in the floor.

Forgot to mention my character's rigid body does not rotate: mCharRigidBody->setAngularFactor(0); I have some more info, I am now displaying collision points in the debugger. The yellow crosshairs represent the collision points. Take a look at the screenshot. The character's collision box penetrates...
by EddieBytes
Mon Jul 25, 2011 7:41 pm
Forum: General Bullet Physics Support and Feedback
Topic: Object stuck in the floor.
Replies: 21
Views: 9264

Re: Object stuck in the floor.

More info: Whenever the character sits (rests) on top of block 'a', it has an Y coordinate of 10.5. If it's stuck inside block 'a' while trying to go left and colliding with block 'b's right edge, it has an Y coordinate of 10.49, so it's obviously a bit sunk into block 'a'. Maybe this has to do with...