I am getting an unresolved external symbols linking error to some of the functions in CollisionConversions which I am using in my code. CollisionConversions lives in: Engine/Private/Collisions My understanding was that I would need the Engine module since this is a subset of engine. I am using ConvertQueryImpactHit.
error LNK2019: unresolved external symbol "enum EConvertQueryResult __cdecl ConvertQueryImpactHit(class UWorld const *,struct physx::PxLocationHit const &,struct FHitResult &,float,struct physx::PxFilterData const &,struct FVector const &,struct FVector const &,class physx::PxGeometry const * const,class physx::PxTransform const &,bool,bool)" (?ConvertQueryImpactHit@@YA?AW4EConvertQueryResult@@PEBVUWorld@@AEBUPxLocationHit@physx@@AEAUFHitResult@@MAEBUPxFilterData@4@AEBUFVector@@4QEBVPxGeometry@4@AEBVPxTransform@4@_N7@Z)
I have Core, PhysX, and APEX in PublicDependencyModuleNames and Engine and CoreUObject in PrivateDependencyModuleNames.
I am including the relevant headers:
#include "PhysXIncludes.h"
#include "PhysicsPublic.h"
#include "PhysXPublic.h"
#include "Runtime/Engine/Private/PhysicsEngine/PhysXSupport.h"
#include "Runtime/Engine/Private/Collision/PhysXCollision.h"
#include "Runtime/Engine/Private/Collision/CollisionConversions.h"
What am I doing wrong here and/or misunderstanding about the module system? Linking error goes away if I remove the ConvertQueryImpactHit function but obviously I am wanting to use this convenient function and will likely run into errors like these again in the future in UE4 if I don’t fix my understanding.