SweepSinglebyChannel Hits Statue when not looked at

in my game the logs say that i am both hitting and not hitting the statue at the same time, i can go up to the statue and look at it and the logs will say i am hitting it but when i look away i got two messages, one saying im not hitting it and one saying i am.



You probably have two grabbers in the world. Log out the owner as well.

Hello, I was unable to figure out how to log out the owner so instead I deleted the Scene component thinking it would delete the duplicate and re-added the component and copied the code from the resources just incase it was my code that was faulty and I still seem to be having the same problem. i tried using a different prop with the grabber and it would still log both hitting and not hitting.

Also I realized this is question is on the wrong video lecture so my apologies.

Line 52 in the first screenshot

UE_LOG(LogTemp, Display, TEXT("%s hit %s"), *GetOwner()->GetName(), *HitActor-><GetName())

when I put that in this is what I get



it seems like the statue is hitting itself.

That would imply you added a grabber component to that static mesh. Find it in the world outliner then remove it from that actor.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms