fabmax / physx-jni

Java JNI bindings for Nvidia PhysX
MIT License
85 stars 8 forks source link

Missing getActors for PxJoint (PhysX 4.0) #49

Closed haubna closed 1 year ago

haubna commented 1 year ago

Missing getActors function for PxJoint as described here: https://gameworksdocs.nvidia.com/PhysX/4.0/documentation/PhysXAPI/files/classPxJoint.html

Useful to calculate the world position when a joint breaks.

fabmax commented 1 year ago

Yes, it's not included because it uses two output parameters, which is not possible in Java. A workaround would be to write two wrapper functions which return actor0 and actor1 individually. Anyway, I'm not going to implement this due to lack of time and I already moved to PhysX 5.

The client side workaround is to simply remember which actors the joint was created with (e.g. with a HashMap or a userData object) and then use these.

haubna commented 1 year ago

Perfect will do that. I will migrate to PhysX 5 in the near future anyways :)