I’m attempting to make a weapon that shoots projectiles, but they keep colliding with the player mesh. If I move them to far forward at launch it doesn’t look right. Is there a way to make them ignore collision on the actor(IE the player) that shot them?
You can approach the problem from a few angles. You can focus on fixing where you spawn it and at what direction is shooting out and make sure it never collides with the capsule of whomever is shooting it. If that’s not working out for you, you may want to look into setting up collision channels. Under your Project Settings/Engine/Collisions you will see a place where can make your own custom collision channels. So for example you could make new channels for “Player Bullets” “Enemy” and “Enemy Bullets” Now go back to your blue prints and if you pick “Custom…” collision types for each blueprint, you can see the checkboxes below and under Enemy make it ignore collisions with Enemy Bullets and under Enemy Bullets make them ignore collisions with Enemies. Once you get all the collisions settings for each blueprint sorted you should be good to go.
Good luck!
I decided since its going to be a single player game, I’ll just ignore pawn collisions. Its working. Because its a crossbow, the projectiles are a tad slower and moving them outward to avoid it didn’t look right.
When you spawn in the projectile, send in the “Self” variable as the instigator. Then in the projectile blueprint, add a check to your “on overlap” to make sure that the other actor is not the same as the instigator (using “get Instigator”). This worked for me, and I have my collision preset to overlap all dynamic.
If the problem is with the player’s collision mesh instead of the projectile, you can set a variable to the spawned actor, and then check your own collision capsule against that variable to see if the touching projectile is equal to the one the player shot.