Search found 23 matches

by paokakis
Thu Jan 13, 2022 9:40 pm
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7348

Re: Jittering and shaking when moving a rigidBody

I tried with a custom delta time but this didn't work either. I reverted to my old settings. The only solution that I have is pass 0 as substeps in the stepSimulation. Now I have decent results. If there is no problem with that we can consider this item as closed. Thanks for all your support, I real...
by paokakis
Thu Jan 13, 2022 12:37 pm
Forum: General Bullet Physics Support and Feedback
Topic: Setting up bullet physics multithreading
Replies: 1
Views: 3073

Re: Setting up bullet physics multithreading

Interested. Did you add

Code: Select all

#define BT_THREADSAFE = 1
?
by paokakis
Thu Jan 13, 2022 10:50 am
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7348

Re: Jittering and shaking when moving a rigidBody

Hello, Thanks for the reply. I'm actually making the Camera follow the spaceship with a Lerp on the position. That's what makes the spaceship shaking. If I don't use Lerp then the Camera is fixed to the spaceship. Then the spaceship is not jittering but the background is. I'm at work at the moment b...
by paokakis
Wed Jan 12, 2022 9:07 pm
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7348

Re: Jittering and shaking when moving a rigidBody

Hi Again, First of all thanks for all your time that you spend on this. You can take a look to see the video https://www.youtube.com/watch?v=VLHajXpz2VQ with the jitter so that you will have a better understanding of what is happening. I tried some things with the most promising setting the fixedSte...
by paokakis
Tue Jan 11, 2022 3:49 pm
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7348

Re: Jittering and shaking when moving a rigidBody

After a lot of trying I still get the jitter when I set the substeps bigger than 0. substeps : maxSubsteps = static_cast<int>(delta / (1.f / 60.0f) + 0.5f) + 1; motion state : void SpaceShipMotionState::getWorldTransform(btTransform& worldTrans) const { float yaw, pitch, roll; auto p = spaceship...
by paokakis
Sun Jan 09, 2022 5:52 pm
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7348

Re: Jittering and shaking when moving a rigidBody

Hi again, I implemented your first two suggestions with minor improvements. First of all now irrelevant of frame rate I get the same response from the physics engine, for example the maximum velocity of the spaceship is the same with 10 fps and with 60 fps but the jitter is still there. only on low ...
by paokakis
Fri Jan 07, 2022 6:07 pm
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7348

Re: Jittering and shaking when moving a rigidBody

Thanks for the quick reply @drleviathan. I am indeed using applyForce() but when I use stepSimulation with substeps = 0 mpDynamicsWorld->stepSimulation(delta, 0); the movement is fine I only get jitter on retrieving the rotation. So when I move my mouse to rotate the Spaceship in my game I get a stu...
by paokakis
Fri Jan 07, 2022 5:55 pm
Forum: General Bullet Physics Support and Feedback
Topic: Bullet crash
Replies: 4
Views: 208

Re: Bullet crash

Thank you for your analysis, it was helpful. I moved around some code and modified the tickcallback function and finally I am crash free. The problem was that I was removing objects from the bullet library while I was iterating through the objects at the same time. My fault, and bullet didn't like i...
by paokakis
Wed Jan 05, 2022 9:45 pm
Forum: General Bullet Physics Support and Feedback
Topic: Jittering and shaking when moving a rigidBody
Replies: 20
Views: 7348

Re: Jittering and shaking when moving a rigidBody

Interested, have the same problem. I know it is an old post but I was wondering if someone found any solutions for this
by paokakis
Wed Jan 05, 2022 8:56 pm
Forum: General Bullet Physics Support and Feedback
Topic: Bullet crash
Replies: 4
Views: 208

Bullet crash

Hello to the group, I have some problems working with bullet and I am wondering what I'm doing wrong. Here is some code that works on collision : // collision detection for (int i = 0; i < world->getDispatcher()->getNumManifolds(); ++i) { btPersistentManifold* contactManifold = world->getDispatcher(...
by paokakis
Fri Dec 24, 2021 9:38 am
Forum: General Bullet Physics Support and Feedback
Topic: Bullet collision failing with fast moving bodies
Replies: 1
Views: 209

Re: Bullet collision failing with fast moving bodies

I found it. You need to make the body do constant collision detection like this:

Code: Select all

body.setCcdMotionThreshold(0.015f);
body.setCcdSweptSphereRadius(0.01f);
by paokakis
Thu Dec 23, 2021 8:55 pm
Forum: General Bullet Physics Support and Feedback
Topic: Bullet collision failing with fast moving bodies
Replies: 1
Views: 209

Bullet collision failing with fast moving bodies

Hello, I am creating a 3D space shooter game using OpenGL and Bullet physics. I have a problem with fast moving projectiles. I am simulating a laser particle using a capsule shape. The problem is that this body penetrates objects some times and even pass through them, possibly because it is moving t...
by paokakis
Thu Jul 29, 2021 5:52 pm
Forum: General Bullet Physics Support and Feedback
Topic: RayTest fails
Replies: 4
Views: 1521

Re: RayTest fails

Thank you very much for your support. I was able to solve my problem this way : btCollisionWorld::ClosestRayResultCallback rayCallback(rayFrom, rayTo); rayCallback.m_collisionFilterGroup = 0b1111111; rayCallback.m_collisionFilterMask = 0b1111111; mpDynamicsWorld->rayTest(rayFrom, rayTo, rayCallback)...
by paokakis
Thu Jul 29, 2021 11:25 am
Forum: General Bullet Physics Support and Feedback
Topic: RayTest fails
Replies: 4
Views: 1521

Re: RayTest fails

I used also other groups but no success... I tried for example group 4 with mask 4 but again I get no raytest results. Only when I use group 1 with mask 1 it works, ah also the default works (no groups and no mask specified). You need to set your callback's group to some single bit and then be sure ...
by paokakis
Wed Jul 28, 2021 3:45 pm
Forum: General Bullet Physics Support and Feedback
Topic: RayTest fails
Replies: 4
Views: 1521

RayTest fails

Hello to the group, I am using bullet in an OpenGL application creating a 3D space shooter. At some point I want to ray cast from the middle of the screen to a rigid body on the screen. This works fine for rigid bodies with group 1 and mask 1. But I have some objects that don't collide with others s...