Solution for collisions with projectiles and its owner

I was having an issue where the spawn point was to close to the mesh of my tank and the bullet was stopping immediately.
There’s a couple of solutions (not ideal but do the job):

  • Create specific collision channels for this issue
  • On begin overlap, deactivate collision, and the opposite for activating again the collisions
  • Move the spawn point foward

But there’s a even better solution, which is making the projectile ignore a specific actor, in this case the tank, using the function IgnoreActorWhenMoving (class AActor* IgnoreActor, bool bShouldIgnore).
With this solution, you don’t need to create a specific channel for each scenario.

Privacy & Terms