Here is a collection of frequently asked questions that have come up so far.
Suggest a new topic for the FAQ section in the forums.
You must remember the following:
To access an encapsulated native object in .Net, get a property from the complex wrappper that returns another, smaller wrapper object - a proxy. Both the proxy and its container reference different parts of the same native object.
Here's a C# example:
Thanks to azreal42.
The native objects that the PhysX engine uses are not simple C-like structs (POD-s). They're C++ classes and most of them include virtual methods. That means their memory layout is more complex than just a sequence of simple values.
If managed wrapper objects were implemented as value types (C# structs), I would be forced to perform a copy of the whole object at each transition from managed to unmanaged and vice versa. Since I liked the idea that I could operate on native PhysX data directly, I implemented the wrappers as reference types.
No, not a chance in hell.
The Xbox PhysX license and source code costs $50K. You'll need to be a registered Xbox developer with Microsoft to get access to development tools in order to compile your game. Registration most probably doesn't come cheap. Also, there's no way to compile C++/CLI code for Xbox, so you'll need to develop code in native C++.
Error reporting in PhysX is done through an error-stream type interface. PhysX Candy Wrapper provides a basic implementation that throws an exception (after dumping the error to the console) each time PhysX complains about an error.
Example: PhysX objects are created from data you provide via Desc objects. Each Object has a corresponding ObjectDesc. It is possible to fill a Desc object with an invalid combination of values. In that case the property IsValid of the Desc object will return false and any attempt to create an object from such a Desc will fail, causing PhysX to report an error thus causing the default ErrorStream object to throw an exception.
If you would like to avoid getting exceptions, even in cases where there are errors, you must derive a class from ErrorStream, override the ReportError method to not throw an exception, and pass your error stream as an argument at Physics creation time:
Thanks to gambitricky.