Fixing the Vehicle class in UE4 starting with NWheel implementation.



        if (const FBodyInstance* BodyInst = UpdatedPrimitive->GetBodyInstance())
        {
            FPhysicsCommand::ExecuteWrite(BodyInst->ActorHandle, &](const FPhysicsActorHandle& Actor)
            {
                PxRigidActor* PActor = FPhysicsInterface::GetPxRigidActor_AssumesLocked(Actor);
                if(!PActor)
                {
                    return;
                }

                if(PxRigidDynamic* PVehicleActor = PActor->is<PxRigidDynamic>())
                {
                    //...
                }
            });
        }