Download

Use Physx-Engine in Game-Project

Hey everybody,

I am trying to figure out how to implement a N-Wheeled Vehicle Movement Component. Therefore I would need to customize the existing WheeledVehicleMovementComponent class, but I can’t access the needed headerfiles from game-projects (like Physx Engine), since they are under Engine/Source/Private.

I tried to add the classes in the Engine-Source code, but there I don’t know how to compile it, since I installed UE4 via the Epic Games Launcher. When I hit compile it always says “target up to date”. New Build does the same thing.
But I really would prefer to be able to code inside my game-project. Is there any way to get access to the Phsyx-Headers? The problem is that these headers also include “EnginePrivat.h”, like game projects include “TitleOfGame.h” as the first include.

I really need to get this done. If it is not possible in game-projects, I could also live with doing it in the engine-source, if you could explain to me how to get it running. It always tells me that either the generated.h files are missing or that the file contains inconsistent DLL-Bindings (freely translated from german debugger output). Also a strange thing is that the generated.h from the original WheeledVehicleMovementComponent class also can’t be found when I try to open it, but that seems to be okay for the compiler

Thanks for your help!

Hello OmaManfred,

To access PhysX related code, you’ll need to include the modules in your project. Open your build.cs file for your project and locate this line:


PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore" });

This lists the modules that you’re including. After “InputCore”, add “PhysX” and “APEX” to include these modules. This should do what you’re attempting to accomplish.

Hope this helps!

Thanks for your answer! I will test that out and give you response if that helped me tomorrow :slight_smile:

Greetings,

Rama’s PhysX Wiki

PhysX Code For Your Game Project!

:slight_smile:

Rama