Description:
I wanted the sphere (UShapeComponent) to detect collisions between actors
Observed:
Detects only Character (ACharacter)
Desirable effect:
Should detect actors
Class file: Problem z kolizją - Pastebin.com
The sphere that is going to collide is the bigger one
What I’ve done so far:
I tried OnComponentHit and OnActorBeginOverlap. The function used is OnComponentBeginOverlap
Collision for both objects have to be set to detect the other and the collision type for each object need a to be correct. Not always, but generally speaking this tends to be the issue.
Take a projectiles for example, the projectiles collision type would be Projectile under Custom Collision panel. The. It would block against all. When the collision system checks if the projectiles has hit something it first checks to see if the other actor is of a type the projectiles has said it would block against, say Pawn or Vehicle. Then it checks the other actor if it will block on a Projectile. If both are true the it generates a hit. It either one is false then it won’t generate a hit.
There is a lot of information regarding collision channels out there. It can be confusing to be used to it but it works really well in practice once you get used to it.