Skip to content

Releases: MochiLibraries/Mochi.PhysX

v0.0.0-alpha1

14 Apr 03:37
776f0c5
Compare
Choose a tag to compare

Mochi.PhysX v0.0.0-alpha1 Sponsor

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 refs 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!

v0.0.0-alpha0

19 Dec 07:30
b462748
Compare
Choose a tag to compare

Mochi.PhysX v0.0.0-alpha0 Sponsor

This is the initial NuGet.org pre-release of Mochi.PhysX! (Apologies for the delay!)

This release wraps NVIDIA PhysX 4.1.2.29882248.

Currently packages are only provided for Windows x64 as I am still working on our cross-platform consumption story.

Please keep in mind some aspects of the bindings still have some sharp edges, and only the low-level unsafe bindings are available. There's also a few holes in the API still for features Biohazrd doesn't handle just yet. Make sure to reference Mochi.PhysX.Sample for help figuring out some of the weirdness. Don't hesitate to reach out if you run into any weirdness as I still haven't exercised the API as much as I would've liked.

By default your project will reference the release variant of the PhysX runtime. If you want to use the debug, checked, or profile variants: Reference the appropriate package (IE: Mochi.PhysX.Native.win-x64-checked) and call MochiPhysX.SelectRuntimeVariant before invoking any PhysX functionality. Using the checked variant during development is highly recommended.

Special thanks to my sponsors NeuroGEARS and AnderT. Mochi.PhysX wouldn't have ever gotten this far without your support!