Promote FPhysXVehicleManager class to be publicly accessible

Hi Epic staffs,

As the subject says, promote FPhysXVehicleManager class so that they are publicly accessible us, C++ programmers.

This is probably easy to do but it has good uses such as to customize VehicleMovementComponent. To which in my case,
I have to override virtual VehicleMovement::PreTick in order for my class to access my own UpdateState (non-virtual),
but the function PreTick uses FPhysXVehicleManager::VehicleSetupTag.

Also as I searched throughout forum, there are also various reasons of being able to use FPhysXVehicleManager
such as to access WheelState etc etc (I have no need of such things yet).

That makes sense, I’ll see what we can do.

I had a quick look at this, but I’m not 100% sure what you would need exposed. Might it be possible to make a GitHub Pull Request with your proposed changes?

He means that FPhysXVehicleManager class is set as private, so not visible.
See here for more info, last post shows how to expose it in the Source: Accessing Physx vehicle data - UE4 AnswerHub
Would be nice to have this exposed to the API. It’s impossible to do things like wheel effects properly and manipulation of the PhysX wheels without building engine from source.

This should be resolved in 4.15, as we moved all the vehicle support into a plugin! Hopefully that guarantees all the hooks needed are exposed.


That’s great news, thanks!
Although I’m still struggling with it. I’ve added PhysXVehicles to my Public and Private dependencies, but:

FPhysXVehicleManager* VehicleManager = FPhysXVehicleManager::GetVehicleManagerFromScene(InVehicleSim->GetWorld()->GetPhysicsScene());

Still gives me:

'FPhysXVehicleManager': undeclared identifier

Including PhysXVehicleMahager.h leads to file not to be found.
Any ideas what I’m doing wrong?
Thanks in advance.

Ah it looks like PhysXVehicleManager.h is in the Private folder. In the short term, you can either move it to the Public folder instead, or try adding the Private folder to your projects include paths. I’ll move the header to Public for 4.17 (I’m afraid it missed the cutoff date for this kind of change for 4.16).

Awesome news.

Although I am now able to include file, no matter what I try I cannot get rid of that unresolved external.

static class FPhysXVehicleManager * __cdecl FPhysXVehicleManager::GetVehicleManagerFromScene(class FPhysScene *)

Ah - that class will also need a PHYSXVEHICLES_API added to its declaration (see UVehicleAnimInstance for example)

This is affecting me right now. I am lucky, as I needed only GetDefaultTireConfig() function from manager, so I can recreate it in component class.

So i’d need to be able to access the VehicleManager to… please make it public!