Help with set collisions on projectiles

How do you make it to where an object collides with one thing but not with another, I’m coding a game where the main character has a shotgun but every time the gun is shot Infront behind them the bullets cause them to also move backwards but turning off collisions makes it hard to see where your bullets land. is there any way to make it so the bullets only collide with the environment and enemies and not the player?

You could try making it non-solid and using some collision behaviors but any thing more specific would require a link to the game, so I can see what you want.

i wouldn’t know how to do that sadly so ill link the game, what you need to know is that the projectile is an asset itself and has its own physics

You can add a custom Collision Group to the bullet, and a custom Collision Group to the player, where the two collision groups don’t collide with each other, but collide with the rest of the game world. Collision groups can be found in the object properties tab.

2 Likes

Heres the link to the game, if you guys need it Flowlab Game Creator - New Game

Thank you for the advice, I messed around with collisions a little and the projectiles themselves don’t show up on the checklist within the custom collisions menu, do you know how I’d be able to get them to show up. Is there also a way to let the bullets remain as solid objects that don’t hit the player? yet again thank you a lot for your help!

1 Like

Yeah, you have to create a new collision group and add only the projectile object to that group. Then create another custom group for the player, then have the player collide with all other collision groups besides the group you made for the projectile

I found a way to get it to work, still though I will use this advice for future projects of mine, thank you a lot man, have a nice one!

1 Like

Of course, glad I could help :smile:

how do you change who the enemy and the player collisions are