Open utterances-bot opened 6 months ago
How would one learn to add physics and collisions with Bullet if they wanted to? Would it be a similar process as the one described in this tutorial?
Doing this with Bullet instead of ODE4j is remarkably similar, but less portable between different platforms because you're interfacing with a C library from Java. Bullet comes with its own debug drawer, so we don't have to create modelInstances to see the collisions shapes. There is an excellent tutorial by JamesTKhan here on using Bullet with LibGDX: https://www.youtube.com/watch?v=DVKfHfxPKPM
when I run the program the collisions form and I can see them get affected by gravity and other collisions. but the ball meshes don't fall down with it. any idea why? even after copy and pasting the code directly(for testing purposes). was there something in the game screen class I should've added?
I was able to fix it. I was missing syncToPhysics() in my update method.
3D Tutorial - Step 5 - Physics and collisions | Coding Adventures
by Monstrous Software
https://monstroussoftware.github.io/2023/11/05/Tutorial-3D-step5.html