Hi ,glad to see you and your works in this forum! Could you tell me how to creat “WheeledVehicleNW.generated.h”, please? Forgive me for my poor English.
O(∩_∩)O~
This file is automatically generated when you compile your code. You can specify it in your include, and when compiled, it will find it.
Thank you very much!
Hi,! I have troubles when I try to use VehicleMovementComponentNW to inheritance the class WheeledVehicleMovementComponent in VS2015. The edition number of the Engine is 4.12.2.
When I use the code #include “PxVehicleDriveNW.h” in VehicleMovementComponentNW.cpp, my VS2015 always says"fatal error C1083: “PxVehicleDriveNW.h”: No such file or directory". But when I use the full directory #include “D:/Epic Games/4.12/Engine/Source/ThirdParty/PhysX/PhysX-3.3/include/vehicle/PxVehicleDriveNW.h” instead of #include “PxVehicleDriveNW.h”, it still doesn’t work! It seems that my project cannot recognize the path of some souce code.
Could you help me and tell me how to solve this problem, please?
Yes i have similar problem with my pack i canot achieve truly 8 wheel drive with blueprints, currently i managed to get it working but sometimes i got funny results, than you for you input
Hi, you did a great job, I wanted to ask if I can use your code in my project
I don’t know about great. But you’re 100% welcome to it, that’s why it was made.
Hi,
I just tested it and it works perfectly, I just removed your code inside wheeledVehicleNW.cpp/.h and set it up through Blueprints and also I didn’t add anything in the PhysXVehicleManager.cpp and it works.
If you want I can get this into a plugin so others can just download it and use it
Same errors with VS 2015 !! any ideas for 4.12?
Hi , I am sorry , I try install UnrealEngine–4.14 (n wheels plugin) but visual studio give an failed error.I’ll tell you all i do.
1-download UnrealEngine–4.14 (n wheels plugin)
2-I copy Plugins/RunTime files to in my C directory Plugins/RunTime
3-Finally I build my visual studio project .I give an failed error .
And This plugin folder contains setup file,generateprojectfiles.bat and the other files. So should i use this bat files ??
So I don’t know ,how to add and use n wheels plugin with my game project.Could you tell me what I need to do?
Thank you…
Hey !
I’ve tried to setup your VehicleMovementComponentNW in 4.18. and got stuck with some linker errors from physx.
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl physx::PxVehicleDifferentialNWData::setDrivenWheel(unsigned int,bool)" (?setDrivenWheel@PxVehicleDifferentialNWData@physx@@QEAAXI_N@Z) referenced in function "void __cdecl GetVehicleDifferentialNWSetup(struct FVehicleDifferentialNWData const &,class physx::PxVehicleDifferentialNWData &)" (?GetVehicleDifferentialNWSetup@@YAXAEBUFVehicleDifferentialNWData@@AEAVPxVehicleDifferentialNWData@physx@@@Z)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: bool __cdecl physx::PxVehicleDifferentialNWData::getIsDrivenWheel(unsigned int)const " (?getIsDrivenWheel@PxVehicleDifferentialNWData@physx@@QEBA_NI@Z) referenced in function "public: __cdecl UVehicleMovementComponentNW::UVehicleMovementComponentNW(class FObjectInitializer const &)" (??0UVehicleMovementComponentNW@@QEAA@AEBVFObjectInitializer@@@Z)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: static class physx::PxVehicleWheelsSimData * __cdecl physx::PxVehicleWheelsSimData::allocate(unsigned int)" (?allocate@PxVehicleWheelsSimData@physx@@SAPEAV12@I@Z) referenced in function "protected: virtual void __cdecl UVehicleMovementComponentNW::SetupVehicle(void)" (?SetupVehicle@UVehicleMovementComponentNW@@MEAAXXZ)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl physx::PxVehicleWheelsSimData::free(void)" (?free@PxVehicleWheelsSimData@physx@@QEAAXXZ) referenced in function "public: static void __cdecl UE4Function_Private::TFunctionRefCaller<class <lambda_8ab1b46f55d36126ddd06e41652cce8a> const ,void __cdecl(void)>::Call(void *)" (?Call@?$TFunctionRefCaller@$$CBV<lambda_8ab1b46f55d36126ddd06e41652cce8a>@@$$A6AXXZ@UE4Function_Private@@SAXPEAX@Z)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl physx::PxVehicleDriveSimData::setEngineData(class physx::PxVehicleEngineData const &)" (?setEngineData@PxVehicleDriveSimData@physx@@QEAAXAEBVPxVehicleEngineData@2@@Z) referenced in function "void __cdecl SetupDriveHelper(class UVehicleMovementComponentNW const *,class physx::PxVehicleWheelsSimData const *,class physx::PxVehicleDriveSimDataNW &)" (?SetupDriveHelper@@YAXPEBVUVehicleMovementComponentNW@@PEBVPxVehicleWheelsSimData@physx@@AEAVPxVehicleDriveSimDataNW@3@@Z)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl physx::PxVehicleDriveSimData::setGearsData(class physx::PxVehicleGearsData const &)" (?setGearsData@PxVehicleDriveSimData@physx@@QEAAXAEBVPxVehicleGearsData@2@@Z) referenced in function "void __cdecl SetupDriveHelper(class UVehicleMovementComponentNW const *,class physx::PxVehicleWheelsSimData const *,class physx::PxVehicleDriveSimDataNW &)" (?SetupDriveHelper@@YAXPEBVUVehicleMovementComponentNW@@PEBVPxVehicleWheelsSimData@physx@@AEAVPxVehicleDriveSimDataNW@3@@Z)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl physx::PxVehicleDriveSimData::setClutchData(class physx::PxVehicleClutchData const &)" (?setClutchData@PxVehicleDriveSimData@physx@@QEAAXAEBVPxVehicleClutchData@2@@Z) referenced in function "void __cdecl SetupDriveHelper(class UVehicleMovementComponentNW const *,class physx::PxVehicleWheelsSimData const *,class physx::PxVehicleDriveSimDataNW &)" (?SetupDriveHelper@@YAXPEBVUVehicleMovementComponentNW@@PEBVPxVehicleWheelsSimData@physx@@AEAVPxVehicleDriveSimDataNW@3@@Z)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl physx::PxVehicleDriveSimData::setAutoBoxData(class physx::PxVehicleAutoBoxData const &)" (?setAutoBoxData@PxVehicleDriveSimData@physx@@QEAAXAEBVPxVehicleAutoBoxData@2@@Z) referenced in function "void __cdecl SetupDriveHelper(class UVehicleMovementComponentNW const *,class physx::PxVehicleWheelsSimData const *,class physx::PxVehicleDriveSimDataNW &)" (?SetupDriveHelper@@YAXPEBVUVehicleMovementComponentNW@@PEBVPxVehicleWheelsSimData@physx@@AEAVPxVehicleDriveSimDataNW@3@@Z)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl physx::PxVehicleDriveSimDataNW::setDiffData(class physx::PxVehicleDifferentialNWData const &)" (?setDiffData@PxVehicleDriveSimDataNW@physx@@QEAAXAEBVPxVehicleDifferentialNWData@2@@Z) referenced in function "void __cdecl SetupDriveHelper(class UVehicleMovementComponentNW const *,class physx::PxVehicleWheelsSimData const *,class physx::PxVehicleDriveSimDataNW &)" (?SetupDriveHelper@@YAXPEBVUVehicleMovementComponentNW@@PEBVPxVehicleWheelsSimData@physx@@AEAVPxVehicleDriveSimDataNW@3@@Z)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: static class physx::PxVehicleDriveNW * __cdecl physx::PxVehicleDriveNW::allocate(unsigned int)" (?allocate@PxVehicleDriveNW@physx@@SAPEAV12@I@Z) referenced in function "protected: virtual void __cdecl UVehicleMovementComponentNW::SetupVehicle(void)" (?SetupVehicle@UVehicleMovementComponentNW@@MEAAXXZ)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl physx::PxVehicleDriveNW::setup(class physx::PxPhysics *,class physx::PxRigidDynamic *,class physx::PxVehicleWheelsSimData const &,class physx::PxVehicleDriveSimDataNW const &,unsigned int)" (?setup@PxVehicleDriveNW@physx@@QEAAXPEAVPxPhysics@2@PEAVPxRigidDynamic@2@AEBVPxVehicleWheelsSimData@2@AEBVPxVehicleDriveSimDataNW@2@I@Z) referenced in function "public: static void __cdecl UE4Function_Private::TFunctionRefCaller<class <lambda_8ab1b46f55d36126ddd06e41652cce8a> const ,void __cdecl(void)>::Call(void *)" (?Call@?$TFunctionRefCaller@$$CBV<lambda_8ab1b46f55d36126ddd06e41652cce8a>@@$$A6AXXZ@UE4Function_Private@@SAXPEAX@Z)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl physx::PxVehicleDriveNW::setToRestState(void)" (?setToRestState@PxVehicleDriveNW@physx@@QEAAXXZ) referenced in function "public: static void __cdecl UE4Function_Private::TFunctionRefCaller<class <lambda_8ab1b46f55d36126ddd06e41652cce8a> const ,void __cdecl(void)>::Call(void *)" (?Call@?$TFunctionRefCaller@$$CBV<lambda_8ab1b46f55d36126ddd06e41652cce8a>@@$$A6AXXZ@UE4Function_Private@@SAXPEAX@Z)
1>VehicleMovementComponentNW.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl physx::PxVehicleDriveNWSmoothAnalogRawInputsAndSetAnalogInputs(struct physx::PxVehiclePadSmoothingData const &,class physx::PxFixedSizeLookupTable<8> const &,class physx::PxVehicleDriveNWRawInputData const &,float,bool,class physx::PxVehicleDriveNW &)" (?PxVehicleDriveNWSmoothAnalogRawInputsAndSetAnalogInputs@physx@@YAXAEBUPxVehiclePadSmoothingData@1@AEBV?$PxFixedSizeLookupTable@$07@1@AEBVPxVehicleDriveNWRawInputData@1@M_NAEAVPxVehicleDriveNW@1@@Z) referenced in function "public: void __cdecl <lambda_582d9c32ec298adede23da4f2f5bfb84>::operator()(void)const " (??R<lambda_582d9c32ec298adede23da4f2f5bfb84>@@QEBAXXZ)
I included the PhysX and APEX dependencies in my build.cs already and everything else seems to be working pretty well. Do you have any ideas what I am doing wrong here?
Tôi đã được như trên nhưng dường như nó không hoạt động. Xin hãy giúp tôi
@ lipsense :
Nevermind! Just look through the physx documentation and see the new solution!
Hi guys! Such a great solution and thread! Im trying to implement this in a project but get stuck on these lines from Vehiclemovementcomponentnw.cpp which Ive created as an actor component in editor:
FBodyInstance* BodyInstance = UpdatedPrimitive->GetBodyInstance();
BodyInstance->ExecuteOnPhysicsReadWrite(&]
{
#if WITH_PHYSX && PHYSICS_INTERFACE_PHYSX
PxRigidDynamic* PRigidDynamic = FPhysicsInterface::GetPxRigidDynamic_AssumesLocked(BodyInstance->GetPhysicsActorHandle()); // BodyInstance->GetPxRigidDynamic_AssumesLocked();
#endif
PVehicleDriveNW->setup(GPhysXSDK, PRigidDynamic, *PWheelsSimData, DriveData, 0);
PVehicleDriveNW->setToRestState();
// Cleanup.
PWheelsSimData->free();
});
fbodyinstance is no longer containing ExecuteOnPhysicsReadWrite(&], do you know what it was replaced with?
Thank you for the assistance,
Wisk
Hey @](https://twitter.com/)
I am having a problem like this. If you already have the best answer, please guide me. Thanks you.
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>())
{
//...
}
});
}
Hey I am also having the same problem D2 Ascendat Challenge If you already have the best answer, please guide me. Thanks you
hey @omggamer](http://omggamer.com/)
Yes I have similar problem with my pack i can’t achieve truly 8 wheel drive with blueprints, currently i managed to get it working but sometimes i got funny results, than you for you input
Hey . This looks interesting. Could you possibly add or tell me how I would make articulated steering?
You know like one four wheeled loaders?