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"

Can't correctly set Collision Responses

I seem to have a problem understanding collision responses with collision components, or something isn't working the way I would expect, if indeed I do understand.

I can't get a sphere collision to fire overlap or hit events on a character mesh. I've tried literally every permutation on each object in question. The strange thing is, a Projectile's collision configuration has no issue with this, it will hit the CharacterMesh and give me bones, locations and everything else in the HitResult. But I can't get the same result with a melee type of collision set up, even though they are set up identically!

I'm thinking there must be something fundamentally different from the collision sphere for the projectile versus the melee collision capsule I'm using, specifically, that there is Movement associated with the Projectile, but the melee collision is not 'moving' per say, but is a result of animation.

Is this the fundamental difference? I'd like to get the hit location for the melee weapon, but I can't get the capsule to collide with the CharacterMesh, no matter how I configure it.

Any ideas on why I can't get a Hit or Overlap event with the CharacterMesh or what I should be looking for?

Product Version: UE 4.9
Tags:
more ▼

asked Dec 26 '15 at 03:36 PM in Blueprint Scripting

avatar image

devlyn811
349 21 18 35

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

1 answer: sort voted first

Do you have generate overlap events enabled?

For collision to work in UE4, both parties involved must block or overlap each other's object type (I believe a block-overlap connection results in an overlap.) For instance:

Object A: Type: World Dynamic. Blocks: All.

Object B: Type: World Static. Blocks: All.

These will block each other.

Object C: Type: Vehicle. Blocks: World Dynamic, World Static.

Object D: Type: Pawn: Blocks: All.

These objects will not block each other because Object C does not block Pawn.

more ▼

answered Dec 26 '15 at 04:04 PM

avatar image

TTaM
1.7k 81 28 81

avatar image devlyn811 Dec 26 '15 at 04:59 PM

Thanks for the quick response!

Yes, I am enabling Generate Overlap Events on all parties in question. Here are the settings for the parties in question:

CharacterMesh:

alt text

Projectile:

alt text

Melee:

alt text

Now the thing to note, is that I have tried every other combination for the melee to get it to work on the character mesh. The settings on the Melee collision you see here are actually just my current attempt to get a response. The Projectile settings work perfectly, but the melee isn't working at all. The best I can get for the melee collision is to set its type to WorldStatic and block all but Pawn, then create a collision capsule around the character mesh and test against that, which works, but doesn't deliver a HitResult.

I've tried setting the melee collision to match the projectile collision, but it doesn't get a response - which is what is so weird...

avatar image TTaM Dec 26 '15 at 05:02 PM

Is the melee hitbox the root component of its actor?

avatar image devlyn811 Dec 26 '15 at 05:01 PM

I already have an alternate system in place to get a hit location, by simply doing a trace, rather than letting the character mesh interact with the melee collision, but I'm just trying to understand why the settings won't work on their own.

avatar image devlyn811 Dec 26 '15 at 05:27 PM

No it's not.

avatar image devlyn811 Dec 26 '15 at 05:27 PM

I'm guessing it needs to be?

avatar image devlyn811 Dec 26 '15 at 05:32 PM

And right now, I'm really hoping you say 'no'...

avatar image TTaM Dec 26 '15 at 05:38 PM

Try making the sword its own actor. Might just start working. You can attach it to your character in exactly the same way.

avatar image devlyn811 Dec 26 '15 at 06:41 PM

OK - I have the collision set to as it was before - I had to reset the instance settings to the blueprint defaults on the character.

It could very well be that the collision has to be the root component, but I'll have to look into this more deeply at a later time. For now, doing a short trace to get a bone name will suffice and there is no noticeable difference to the player to do it in this manner.

I appreciate your time!

avatar image devlyn811 Dec 26 '15 at 05:39 PM

And wow - now I can't get any collision response on it at all. holy cow. I should have left it as was...

(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