Collision problem

Hi everyone!
I’m having problems with collision of my character. I previously posted a question (months ago) about a boomerang weapon and I had problems with collision and I didn’t mind back then, but now I just want to get this out of way. I want to destroy weapon when it hits my character and somehow this only works sometimes. bad collision results in my character somehow rising up with weapon stuck inside its stomach and if I move it manages to destroy it. There’s probably something wrong with my collision settings because I’ve tried to manage destruction in both my character blueprint and my boomerang blueprint and same behavior always occurs.

Here are some pictures, this is how I try to destroy weapon in my bp:

Here’s how I set character variable’s value(I don’t know if this is necessary):

Here are my settings for character’s capsule’s collision:

Here’s settings of mesh’s collision:

Any help will be appreciated, thanks!

Hi EliasPa,

Try enabling Use CCD. It’s possible your boomerang is too small or moving too fast for collision detection to work properly without it.

There seems to be some things off, but it would be great if you could provide a bit a of a more detailed layout how things are looking.

  • Character Variable, how doe sit actually get a value set when it is cast and than being set. Is there something else going on (I assume it is)
  • Boomerang is of Collision Object Type WorldDynamic?
  • Character of Object Type Pawn?

Also, maybe you shouldn’t check against other Comp if equal to character if there is no certain requirements such as, it needs to be a certain Character Type. Why not cast it to your character/pawn class and let casting mechanism decide if or not to destroy Boomerang.

Also I see you have chosen for flow control a sequence. What exactly happens there, since you are destroying in your example perhaps Actor and it might be interesting to see that scope at least too.

Best

It still seems to be colliding with something even when I tried to decrease speed. Could there be something wrong with weapon’s collision settings?

character variable is just used for getting my character’s location when boomerang is coming back to my player, I just added cast but it actually works without it but with same collision problems. And boomerang’s object type is WorldDynamic and I’ve built my character based on third person template available. sequence is just for an other collision check for a destructible but it has nothing to do with problem, it still occurs with or without it. But how would you recommend I should do Event hit part?

Hi again,

Sorry, I missed part in your post where you said it gets stuck in character; CCD would only help things if it wasn’t detecting collision at all, and clearly it must be if it’s being stopped.

So my guess is that problem is you’re using a Character variable that isn’t being set to anything, so Other from your Event Hit is never going to == Character variable.

Try this instead, and forget using Character variable:

Let me know if that doesn’t help.

Unfortunately this didn’t resolve problem. And also I wanted to point out that this problem doesn’t seem to occur when my character is moving forward, I have a slightly forward leaning animation so mesh exits its capsule partially . Also problem seems to be inconsistent, sometimes it just pushes character back a bit and sometimes it gets stuck in bottom of character’s feet.

Are you able to reproduce this behavior in a new project, or only your current project? Would you mind putting a test project (or this project, if you’re comfortable sharing it) in which this occurs online somewhere and giving me a download link? I’d like to see if there’s a bug in here somewhere. Thanks!

Thank you for trying to fix this! I have reproduced problem in a new project now but what would be best way of getting this project to you?

You can upload it to Dropbox or Google Drive, both of which are free, and reply with a download link here.

Should I upload whole project file or is it necessary? I’ll post link here shortly.

whole project folder, please. Thanks!

Here’s link for project:
https://www.dropbox.com/s/kbm057a3mt26m2i/TestProject1.?dl=0
Thanks for helping!

It looks like one of your Set Actor Location nodes wasn’t set to Sweep, so it wasn’t detecting collision between points. Set Actor Location simply teleports Actor to it’s new location and doesn’t detect collision between those points unless Sweep is enabled. Turn that one and you should be good to go!

Yea that did it. Thank you so much!