Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to get changes from PhysX into UE4?

Hello everyone,

I am looking for a workflow on how to bring custom changes in the PhysiX source into our game.

We need to get some small changes in the PhysX source code done in order to solve a major bug in our project. Via Nvidia we got access to the source code of PhysX and we already have some custom C++ classes (GameModes) within our project (however, we do whatever we can with blueprints). So far I found this Tutorial from Rama, but I could not figure out what exactly to do so far. Do we have to create a project in Visual Studio with the PhysX source code, do our changes, compile it all and then just exchange the PhysX.sln in the UE4 folder? Or is there more to it?

Background: We are developing a multiplayer racing game. While we can get the handling of our cars done within the engine, there is one showstopper bug. When a car is stationary and another car rams it, the stationary car behaves like a stone monument. The reason for this seems to be known since 2014. But still, the issue is not resolved yet officially and, therefore, we need to do it ourselfs...

Any help (hint, link to tutorial, confirmation of my question (even a vote on the issue^^)...) would be appreciated.

Have a nice day,


Product Version: UE 4.15
more ▼

asked Feb 24 '17 at 09:57 AM in C++ Programming

avatar image

212 22 23 31

avatar image astearon Feb 24 '17 at 10:13 AM

I have no idea if this helps but the car turning to stone might be the engine's way to pause simulation for "idle" objects.

An idea about going around this is to cast rays from every vehicle and if another one is approaching to "wake the simulation up" sort of speak. You could do this by applying a force to the stationary car to wake it just before impact so the simulation has time to account for the incoming car.

avatar image Syrill Feb 24 '17 at 10:22 AM

Interesting idea, but the issue seems to be within PhysX. And what we have observed during our tests, the physics simulation is on. The suspension, for example, reacts depending on the impact (e.g. bomb under the car), but the wheels stay glued to the ground.

avatar image Syrill Feb 24 '17 at 01:05 PM

Alright, I gave it a try. See the screenshot for details, if you are interested. Sadly, it did not work.

Thus, back to the PhysX source code...

Screenshot of the test

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

We finally managed to compile the PhysX source code!

  • First of all, you don't need to get the PhysX source code from nvidia, it's included in Unreal already

  • Make sure that your UE4 source folder has no spaces in the folder name (link)

  • Keep to the instructions from this tutorial and execute the batch files to generate the solution files or to build the libs

  • Finally, rebuild the engine in Visual Studio

To build the changed Physx code on a Mac change the batch files to be executed as shell scripts and change TargetPlatforms to Mac or what platform you want to build for.

 RunUAT.sh BuildPhysX -TargetPlatforms=Mac -SkipBuild -SkipCreateChangelist

Remove the option -SkipBuild for the build script to actually build and not only create the Xcode project files.

more ▼

answered Mar 10 '17 at 12:13 PM

avatar image

95 1 4 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question