Build PhysX For UE4 On Windows


Sometimes we need to debugging PhysX for UE4. But it seems .pdb files are not provided when it comes to PhysX.

And sometimes we might want to modify PhysX code, thus we need to build our own PhysX binaries.

You need Visual Studio 2015 and CMake installed on your computer. Make sure you have C++ installed for your VS 2015.

Steps 1: Generate Visual Studio Files

This step is fairly easy—simply lanch CMake, fill Source Code Location and Binary Location:


Hit Configure, select Win64 as platform, and wait…


Oops! one error, if my guess is right, would pop up during configuration stage:


It seems that GW_DEPS_ROOT is not set. Click Enviroment, and Add Entry like this:


This should work! Click Configure again, and then Generate.

Now we have our Visual Studio files.


Step 2: Build PhysX Project

I truly believe that there is no need to talk about… compiling the project.

You can compile any mode of PhysX you like. I prefer profile mode personly.

It should be noted that different mode of PhysX would be loaded in accordance with different engine mode. You can check out GetPhysXLibraryMode function in PhysX.Build.cs for details.


After building PhysX, you can find dlls and pdbs:


Step 3: Let’s Party!

Simply copy our dlls and pdbs to the binary folder in our engine.

And now we can dive into PhysX’s underlying logic!


If you still cannot dive into PhysX, check your module:


And load PhysX module manually:


That’s all! And enjoy it!

I am so cute, please give me money...