A problem with a sphere rolling on terrain
Posted: Wed Oct 06, 2021 7:40 pm
Hello,
I've been using the java port of Bullet and have been having problems with the sphere shape.
In my game, the sphere does interact with the terrain (doesn't go through it) but the rolling effect is glitching.
would love to get some help on how to get the proper rotation values for OpenGL;
this is my code for the rotation, would appreciate any sort of help (:
private static Vector3f getBallRotation(RigidBody ball)
{
Quat4f out = new Quat4f();
ball.getMotionState().getWorldTransform(new Transform()).getRotation(out);
return new Vector3f(out.x, out.y, out.z);
}
I've been using the java port of Bullet and have been having problems with the sphere shape.
In my game, the sphere does interact with the terrain (doesn't go through it) but the rolling effect is glitching.
would love to get some help on how to get the proper rotation values for OpenGL;
this is my code for the rotation, would appreciate any sort of help (:
private static Vector3f getBallRotation(RigidBody ball)
{
Quat4f out = new Quat4f();
ball.getMotionState().getWorldTransform(new Transform()).getRotation(out);
return new Vector3f(out.x, out.y, out.z);
}