Skip to content

MochiLibraries/Mochi.PhysX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhysX-flavored Mochi

MIT Licensed CI Status NuGet Version Sponsor

This repo contains C# bindings for NVIDIA PhysX as well as a Biohazrd-powered generator for generating them.

The bindings are still young but should be usable on Windows with some quirks. If you're interested in using PhysX on .NET, please consider sponsoring development of this library.

License

This project is licensed under the MIT License. See the license file for details.

Additionally, this project has some third-party dependencies. See the third-party notice listing for details.

Some of the sample files are adapted from the PhysX SDK and as such are licensed differently, as noted by the license at the top of affected files.

Building

Prerequisites

Currently only Windows x64 is supported.

Tool Recommended Version
Visual Studio 2022 17.1.6
.NET SDK 6.0

Visual Studio requires the "Desktop development with C++" and ".NET desktop development" workloads to be installed.

Building PhysX and generating the bindings

  1. Ensure Git submodules are up-to-date with git submodule update --init --recursive
  2. Build and run build.cmd from the repository root

Note: You may see many errors and warnings during generation. This is because Biohazrd doesn't support quite everything in PhysX yet. These errors only indicate the corresponding APIs were skipped, so the output should still be fine as long as you don't need those APIs.

If you make any changes to the PhysX source code or change the branch it uses, you must re-generate the bindings using build.cmd.

Sample projects

The Snippets directory contains select snippets adapted from the ones included with PhysX SDK. See the snippets readme for details.