x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Collision problem

Hi everyone! I'm having problems with the collision of my character. I previously posted a question (months ago) asking about a boomerang weapon and I had problems with the collision and I didn't mind back then, but now I just want to get this out of the way. I want to destroy the weapon when it hits my character and somehow this only works sometimes. The bad collision results in my character somehow rising up with the 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 the destruction in both my character blueprint and my boomerang blueprint and the same behavior always occurs.

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

Here's how I set the character variable's value(I don't know if this is necessary): alt text

Here are my settings for the character's capsule's collision: alt text

Here's the settings of the mesh's collision:

alt text

Any help will be appreciated, thanks!

Product Version: Not Selected
Tags:
more ▼

asked Mar 16 '15 at 07:41 PM in Blueprint Scripting

avatar image

EliasPa
89 22 22 23

avatar image Ben Halliday STAFF Mar 16 '15 at 08:15 PM

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.

avatar image EliasPa Mar 16 '15 at 09:24 PM

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

avatar image Martin Egger Mar 16 '15 at 09:33 PM

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)

  • The Boomerang is of Collision Object Type WorldDynamic?

  • Character of Object Type Pawn?

Also, maybe you shouldn't check against other Comp if equal to the 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 the Boomerang.

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

Best

avatar image EliasPa Mar 16 '15 at 09:57 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi again,

Sorry, I missed the part in your post where you said it gets stuck in the 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 the problem is you're using a Character variable that isn't being set to anything, so the Other from your Event Hit is never going to == the Character variable.

Try this instead, and forget using the Character variable:

alt text

Let me know if that doesn't help.

more ▼

answered Mar 16 '15 at 11:38 PM

avatar image EliasPa Mar 17 '15 at 07:52 AM

Unfortunately this didn't resolve the 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 the mesh exits its capsule partially . Also the problem seems to be inconsistent, sometimes it just pushes the character back a bit and sometimes it gets stuck in the bottom of the character's feet.

avatar image Ben Halliday STAFF Mar 17 '15 at 04:11 PM

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!

avatar image EliasPa Mar 17 '15 at 05:36 PM

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

avatar image Ben Halliday STAFF Mar 17 '15 at 05:42 PM

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

avatar image EliasPa Mar 17 '15 at 06:10 PM

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

avatar image Ben Halliday STAFF Mar 17 '15 at 06:44 PM

Zip the whole project folder, please. Thanks!

avatar image EliasPa Mar 17 '15 at 07:23 PM

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

avatar image Ben Halliday STAFF Mar 18 '15 at 12:28 AM

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 the 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!

avatar image EliasPa Mar 18 '15 at 05:32 AM

Yea that did it. Thank you so much!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question