fabmax / physx-jni

Java JNI bindings for Nvidia PhysX
MIT License
89 stars 9 forks source link

Passing NULL #35

Closed haubna closed 2 years ago

haubna commented 2 years ago

Couldn't find a way to pass NULL to PxTopLevelFunctions.RevoluteJointCreate()

As described in the official documentation (https://gameworksdocs.nvidia.com/PhysX/4.0/documentation/PhysXGuide/Manual/Joints.html): "One of the actors must be movable, either a PxRigidDynamic or a PxArticulationLink. The other may be of one of those types, or a PxRigidStatic. Use a NULL pointer here to indicate an implicit actor representing the immovable global reference frame."

fabmax commented 2 years ago

Ok, I made the actor0 and actor1 parameters of the createJoint functions nullable, will be included in 0.4.17. As a quickfix it should be possbile to take a PxRigidStatic actor.

haubna commented 2 years ago

Thanks! :)