Ravi80335
(Ravi80335)
1
if(HasAuthority())
{
TArray<TEnumAsByte<EObjectTypeQuery>> ObjectTypes;
ObjectTypes.Add(EObjectTypeQuery::ObjectTypeQuery1); // Landscape
TArray<AActor*> ActorsToIgnore;
FHitResult OutHit;
bool bFound = UKismetSystemLibrary::LineTraceSingleForObjects(GetWorld(), GetActorLocation(), (GetActorLocation() + GetActorUpVector() * ToDist), ObjectTypes, false, ActorsToIgnore, EDrawDebugTrace::Persistent, OutHit, true);
if(bFound)
{
// more to do..
}
}
-
bFound is always false in World Composition Level in Play as Client only,
- working well in World Composition Level Listen Server,
- working well in normal level (non world composition) in Play as Client also.
Ravi80335
(Ravi80335)
2
This will work anywhere except in InitGame() function of gamemode class.
system
(system)
Closed
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.