KK Physics and jolt-jni

Items 1-3 are included in jolt-jni v0.4.1, which was released on Tuesday.

V0.4.1 also adds temporary support for Linux-on-ARM platforms with 32- and 64-bit CPUs. Long-term support for these platforms will require resolution of a couple Jolt Physics issues, such as issue 1184.

This week’s goal is to round out KK Physics support for collision shapes:

  • BoxCollisionShape, CapsuleCollisionShape, ConvexHullShape, CylinderCollisionShape, MeshCollisionShape, SimplexCollisionShape, and SphereCollisionShape are in good shape (so to speak).
  • HeightfieldCollisionShape and CompoundCollisionShape are current priorities.
  • ConeCollisionShape, GImpactCollisionShape, MultiSphere, and PlaneCollisionShape will probably require custom native code and will therefore be deferred.
11 Likes

Thanks for the update

2 Likes

KK Physics v0.3.0 was released today. This is a major advance over v0.2.0, and I think it’s ready for some limited testing.

If all you want to do is create rigid bodies and simulate their motion, with or without CCD, v0.3.0 might be useful.

Many important features are not yet implemented:

  • cone, gImpact, 2-D, plane, and multi-sphere shapes
  • contact/ray/sweep tests
  • characters, ghost objects, ragdolls, soft bodies, and vehicles
  • physics joints and motors
  • collision listeners and collision groups
  • cloning and serialization
  • ignore lists
  • linear factors and angular factors
  • modifying the collision margin of a shape after it’s been created
  • “local physics” for a rigid-body control

The API (what there is of it) closely resembles both Minie and jme3-jbullet. It includes such familiar conveniences as BulletAppState, RigidBodyControl, PhysicsDumper, and debug visualization.

A couple key differences from Minie/jme3-jbullet:

  • to enable continuous collision detection (CCD), use PhysicsRigidBody.setMotionQuality()
  • to alter a body’s gravity, use PhysicsRigidBody.setGravityFactor()

As usual, I welcome discussion, feature requests, and constructive feedback.

15 Likes

Hey, I’m a noob here, using IDEA for coding. My friend was all like, ‘Dude, you gotta use KK Physisc for your projects.’ So, I tried tossing in the jar, but it’s all messed up with errors, like in the pic I wish I could show you. Is there some secret sauce to making it work?

1 Like

Just from what I see in the screen shot, it looks like you are trying to use bullet and kk physics at the same time.

1 Like

I’m curious who your friend is.
There’s no secret sauce.
KK Physics and Minie both implement the com.jme3.bullet package, so they can’t be used together in the same project.
If Paul’s guess is correct, you should remove the Minie jar from your project.
If that doesn’t solve your issue, I’d like to see some your build scripts and maybe some Java code.

For what it’s worth, my guess was prompted by:

2 Likes

Good eye, Paul! That looks like the issue.
And note that it’s jme3-jbullet (the official JME physics library) not part of Minie.

@I_like_game You should remove the jme3-jbullet jar from your project.

1 Like

Very grateful to both of you! The problem has been solved! Also, because my English is not good, I used AI for translation, there might be some nuances lost in translation, my apologies for that.

1 Like

I used AI for translation, there might be some nuances lost in translation, my apologies for that.

I appreciate your efforts to communicate in English. Apologies are unnecessary.

I’m very glad someone besides me is experimenting with KK Physics!


All:

For the past 3 weeks, my focus has been expanding jolt-jni to support character controllers and constraints/joints. This required a lot of repetitive coding in both C++ and Java. Both features are implemented rather differently in Jolt Physics than in Bullet; I worry they may not translate well into KK Physics.

With the release of Jolt Physics v5.1.0 on 11 August, ongoing support for Linux-on-ARM looks solid.

V5.1.0 also added plane shapes, which will come in handy.

10 Likes

The jolt-jni project is now weblinked from the Jolt Physics README.

Jolt-jni v0.7.0 was released yesterday. It adds support for ragdolls, raycasts, sweep tests, broadphase queries, and tapered shapes.

Getting all these features to work in KK Physics may take some time.

16 Likes