Dear Friends at Epic,
I can correctly do a PrimitiveComponent::K2_LineTraceComponent,
but I cannot figure out how to do the PrimitiveComponent::LineTraceComponent myself
With the exact same inputs as seen below, I can only get the K2 version to return when a component trace succeeds.
The regular PrimitiveComponent::LineTraceComponent version never finds a hit, ever, in the exact same game situations.
#The K2 Version
Mesh->K2_LineTraceComponent(
CombatTraces.Traces[0].Start,
CombatTraces.Traces[0].End,
true,
false,
CombatHit.ImpactPoint,
CombatHit.ImpactNormal
);
if(CombatHit.ImpactPoint != FVector::ZeroVector)
{
CombatDamageHit = true;
DrawDebugLine(
GetWorld(),
CombatTraces.Traces[0].Start,
CombatTraces.Traces[0].End,
FColor(0,255,255),
false, 2, 0,
7.f
);
}
#The Regular PrimitiveComponent::LineTraceComponent
/*
CombatCollisionQuery = FCollisionQueryParams(FName(TEXT("CombatTrace")), true, NULL);
CombatCollisionQuery.bTraceComplex = true;
CombatCollisionQuery.bTraceAsyncScene = true;
CombatCollisionQuery.bReturnPhysicalMaterial = false;
Mesh->LineTraceComponent(
CombatHit,
CombatTraces.Traces[0].Start,
CombatTraces.Traces[0].End,
CombatCollisionQuery
);
if(CombatHit.bBlockingHit)
{
CombatDamageHit = true;
DrawDebugLine(
GetWorld(),
CombatTraces.Traces[0].Start,
CombatTraces.Traces[0].End,
FColor(0,255,255),
false, 2, 0,
7.f
);
}
*/
#CollisionQueryParams
I set the ignore actor to NULL because I dont want any actors ignored, and this function is being run within the actor whose mesh is being checked so I cant use “this”
#What Am I Missing?
What am I missing so that I can do the LineTraceComponent myself and not use the K2 version?
#Thanks!
Thanks!
Rama