Box collision not working as expected

Hello,

I want to pick up a sword laying on the floor but I have a problem with the collisions.
This is my CharacterBP with the function to pick up my sword, which is working fine except for the collision part.
It just doesnt recognize when im near to a sword.

I think the problem is my SwordBP, which is the parent of every sword.
There is already some functionality for collision detection when Im attacking an enemy.
image

The damageState BP if needed:

What am I doing wrong?
I think it has something to do with the SwordCollision I implemented?

Thanks in advance

Hi @florian_17.20!

A few questions for you. Could your “IsHolding?” variable be accidentally set to true initially somewhere? Is it working without the variable? What about the “wearable” tag?

I also see you did not set your array element before setting the target for “AttachActorToComponent”. That may also be your issue. Like so:

I hope the above solutions work for you!

1 Like

Hey, I tried many things, by printing, the “isHolding” variable is set false. The Tag is set in every weapon blueprint. I noticed one thing, if I add a CollisionSphere to my SwordBP the collision is getting detected and its working perfectly. So I´m pretty sure the problem is here somehow.
image
Now you´re probably wondering why Im not just using the CollisionSphere when it´s working by using this, the problem is, as soon as I add the CollisionSphere, my SwordCollision stops working.

Hey, @florian_17.20!

Okay, so it is safe to assume you are using box simplified collision right? Can we see your collision settings for your sword? That way we can see if there was a setting that was accidentally missed?

Any additional info you can provide will help us get closer to a solution for you!

Hey Quetzalcodename
So this are the collision settings of SwordCollision in the SwordBP (Parent of my swords):



This is one of my Swords:

But I actually think, the problem is in my SwordBP in the “Set Collision Enabled” where I set the collision to No Collision depending on the Notify in the damageState Screenshot. It is also Pre-Set as No Collision as you can see in the settings screenshot on top. So its only on “OverlapAll” while Im in my attack Notify. And this isnt the case while Im picking up a weapon obviously.


Thanks for the more in depth look @florian_17.20!

I see. Well if that is the issue, try using a Timer on your blueprint to display the status of your collision to the output log every 10 seconds or so or however you need interval wise.

Also, after some more digging, I found a Reddit Post (not Epic affiliated) that seems to go over event overlaps not triggering correctly. This post will also show you where to look and double check your Generate Overlap Event is active during runtime if you have the screen space to set another window up. Here’s the link:

Event Begin Overlap doesn’t trigger - Solution!

With that out of the way we know it’s more than likely not the events themselves. Hopefully this narrows things down.