This release wraps PhysX v4.1.2.29882248 (NVIDIAGameWorks/PhysX@c3d5537).
This release utilizes a newer version of Biohazrd, which primarily improves the quality and usability of the generated API surface.
Most notably, C++ references are emitted as C# ref
and in
references as appropriate. This typically makes calling PhysX methods more natural as similar to what you'd expect in C++.
For example, this is how you would do the equivalent of PxTransform transform(PxVec3(0.f, 40.f, 100.f));
from C++:
// Old v0.0.0-alpha0 equivalent:
PxVec3 position = new(0f, 40f, 100f); // Need temporary local to reference
PxTransform transform = new(&position);
// New v0.0.0-alpha1 equicalent:
PxTransform transform = new(new(0f, 40f, 100f));
This seemingly minor change makes a lot of PhysX's surface area more natural to interact with.
We also experimented with using this for functions which return C++ references, however this has a tendency to be more annoying than helpful because C# does not let you store ref
s in fields. This meant you had to use Unsafe.AsPointer
with clumsy explicit casting in order to store any references returned by PhysX. (We will explore optionally enabling this for C# 11 consumers since it is expected to support proper ref
fields.)
Special thanks to my sponsors NeuroGEARS and AnderT. The Mochi Library ecosystem wouldn't have ever gotten this far without your support!