Announcement

Collapse
No announcement yet.

Promote FPhysXVehicleManager class to be publicly accessible

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] 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.
    if (VehicleSetupTag != FPhysXVehicleManager::VehicleSetupTag)
    {
    RecreatePhysicsState();
    }
    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).
    Last edited by Syed; 06-26-2016, 02:40 AM.

    #2
    That makes sense, I'll see what we can do.
    Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
    Twitter: @EpicJamesG

    Comment


      #3
      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?
      Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
      Twitter: @EpicJamesG

      Comment


        #4
        Originally posted by JamesG View Post
        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: https://answers.unrealengine.com/que...icle-data.html
        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.

        Comment


          #5
          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.

          James
          Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
          Twitter: @EpicJamesG

          Comment


            #6
            Originally posted by JamesG View Post
            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.

            James
            That's great news, thanks!
            Although I'm still struggling with it. I've added PhysXVehicles to my Public and Private dependencies, but:
            PHP Code:
            FPhysXVehicleManagerVehicleManager FPhysXVehicleManager::GetVehicleManagerFromScene(InVehicleSim->GetWorld()->GetPhysicsScene());
            SCOPED_SCENE_READ_LOCK(VehicleManager->GetScene()); 
            Still gives me:
            PHP Code:
            'FPhysXVehicleManager'undeclared identifier 
            Including PhysXVehicleMahager.h leads to file not to be found.
            Any ideas what I'm doing wrong?
            Thanks in advance.

            Comment


              #7
              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).
              Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
              Twitter: @EpicJamesG

              Comment


                #8
                Originally posted by JamesG View Post
                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.

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

                Comment


                  #9
                  Ah - that class will also need a PHYSXVEHICLES_API added to its declaration (see UVehicleAnimInstance for example)
                  Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
                  Twitter: @EpicJamesG

                  Comment


                    #10
                    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.

                    Comment


                      #11
                      So i'd need to be able to access the VehicleManager to.. please make it public!

                      Comment

                      Working...
                      X