Include PhysxSupport.h

Im having problems with getting physx code to work

I know theres a tutorial for include physx and i have included #include “PhysXIncludes.h” and included Physx in my build.cs
PublicDependencyModuleNames.AddRange(new string] {
“Core”,
“CoreUObject”,
“Engine”,
“InputCore”,
“PhysX”,
“APEX”
});

but there s still a problem with
‘U2PVector’: identifier not found

this comes from PhysXSupport.h

how can i include this or set cs express up to include this?

Edit: if this is fixable through setting up includes it would be very nice if someone can help me guide through this for vs express because im not sure where / how to add this

OK seems i fixed this myself ;D

vs project properties vc++ include directories

set this to \Engine\Source\Runtime\Engine\Private\PhysicsEngine
in the source code of the editor/engine

maybe it would be good to get a way to do stuff like this without having to have the full engine code

You don`t need the engine code for it, binary files work fin.
I had the same issue as you, and I first solved it in the same way.

But realy all you need to do is Regenerate the Visual Studio Project files.
That should do the trick, it did for me.

Ok so its very early and im at my first cup of coffee so im wondering a bit. ;D

Is what youre trying to tell me that u can just include the header without building it of course then close vs and generate vs files over the uproject.exe and then it would work with a typical binary based project?
Or did You mean a rebuild of the whole Project in VS? I try to avoid these because it takes me nearly and hour to rebuild engine and project together.

But anyhow my point was more that these things would be nicer to have in the physixIncludes.h … or is that what would have happen after the regen? Or because of the physx include in the builder?

My Position in that matter is that I myself dont want to edit the source code itself because of the massive comile time and i dont like mergin that much, but im also very interested whats under the hood when im using something so i will always use the engine as a base for projects so i can see whats going on in the cpp files.

So i dont care too much about it but i said it thinking about others and now im interested if i understood u right.

Edit: i forget I think i have to thank u anyway because your posts in the answer hub have given me the way all along.
Thank you very Much .

How to Include PhysXSupport.h

You can Indeed #include PhysXSupport.h

For anyone who finds this in the future, you can easily include PhysXSupport for Epic’s awesome SceneLocking macros like this:

//make sure you have PhysX and APEX in your builds cs as shown above

and then add these includes in the .cpp where you want to use SCOPED_READ_LOCK etc



//PhysX 
#include "PhysXIncludes.h"
#include "PhysicsPublic.h"		//For the ptou conversions
#include "Runtime/Engine/Private/PhysicsEngine/PhysXSupport.h"


The secret is this:



#include "Runtime/Engine/Private/PhysicsEngine/PhysXSupport.h"


:wink: