Player weapon collision doesn't work?

I feel like I’m doing something really stupid wrong…but after 2 ans a half hours I’m stumped.

Is there anything special about the collision sphere from the my character BP? I wall around my level…NO problem…but if I duplicate this collision and put it around my weapon it still goes through. My weapon goes through EVERYTHING. It ignored all collision and I’ve setup up trigger to block EVERYTHING! and like I sai…i can run into these walls but why can I shoot through them and why does my weapon go through them if the weapon collision AND the projectile are to set to block all???

Please help.

What Collision channel are they on?

I had a hell of a for a while with the collision not working but everything changed when I discovered the collision channels…they are awesome!

first off, you only need to set collision for the collision in the blueprint, nothing else.

A collision channel is simply a grouping of objects. for instance in the image I created “enemy” and “Allie” . I put all “enemies” in the enemy channel ect. I even put the enemy projectile BP as “enemy”.

You can tell each collision what you want to do with that group.
EX: I want all enemies to ignore other enemies ect

You can create a new channel by going to Edit->project settings → collision(under Engine) : New Channel

Hope this helps!

What kind collision you use on your weapon ? like physical asset or just some box collider around weapon. If Box collider check your box collision setting, if physical asset check you setting on your body and enable the body collision. Also some screenshot on your collision setting here could be helpful.

I’ll post a pic later if I need to. I feel like my collision settings are right and yea it’s a box. How do I create a physical asset?? And what exactly are the collision channels? That sounds helpful.

I know this may sound stupid. Have you opened the gun by itself and add collision?

Check this, in Type did you change your to Weapon. That Type is the Collision Channel

Yes. ALL of these things are set. Sorry I didn’t know the proper terminology I have it set to ignore all but block just static and dynamic which is ALL of the world whether it be moving objects or just static models.

But this model is PART OF the my character BP once again. and the character collision component obviously can’t move through walls. without any issue whatsoever. So why would the gun still not go through?? And yes the mesh it self has collision AS WELL AS in the BP as you’ve posted and as I’ve said.

What’s different about the collision component in the My character BP

wait you mean you have your weapon in your character and the weapon move through wall is it ? in this case there nothing to do with collision setting, the collision always take the highest collision to check that mean your character’s collision will ignore any child collision it have, so whatever you set it have no effect.

Ok so HOW would I set it to where the gun doesn’t go through walls???

You would probably have to create a weapon blueprint and connect the weapon that way, which would have it’s own collision.

So just attach the weapon BP to the Player BP.
Like with the node? Attach actor to actor??
How would I get it to attach to the camera component of the player so it rotates correctly…
Attach actor to component?

is your character a skeleton mesh? If so, create a socket to where the weapon would be attached.

I honestly don’t know anything about BP scripting, just C++ so I couldn’t help with it after creating the socket on the player mesh :frowning: Basically when you attach the weapon blueprint to the character it’s going to attach the root of the weapon to the socket

Maybe this can help you - YouTube

there’s a lot of way around, in my game i make the gun size for first person smaller than actual size so it always stay in the character capsule, if you want you can make you capsule size bigger than weapon, other way it’s use 2 camera 1 normal and 1 just render the gun only, so even the gun go through wall you won’t see it. Other is you need to do the collision detect manual like how long is your weapon and detect if the wall in front of u is in range then stop you character.

It isnt a skeletal mesh. No mesh. It’s very simple
Just a gun and a collision component. How would I attach the 2 BPs?? To where they both have collision?

And I unfortunately can’t make the gun smaller or the player collision bigger…
But is it possible to set a camera to only render that component? And if so could someone tell me how???

can you get a pic of what you have?

Actually…
Sense this was a demo with no weapon change I did that trick that was mentioned. Shrunk my weapon and pulled it closer to the screen, re worked the vector math and bamb…there it is.

Thanks guys. That will work untill I get the full skeletal
Cheers!