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"

Why can't I access physical material on hit event

Hi.

So I was working with hit events ob my bullets so I can make that material hit effect (hits wood, makes wood effect, hits metal makes metal effect, etc...) The only way I managed to make hit recive the material was to apply the phys material into the material:

alt text

to access it:

alt text

but for my project it's not reasonable to make a new material for every surface and most of the collision is going to be based on components like this:

alt text

to access it:

alt text

however, when I try to access the phys mat this way it just dosen't work and gives an error:

alt text

what do I do to acsses phys mat this way?

Product Version: UE 4.21
Tags:
2.png (54.2 kB)
3.png (43.8 kB)
4.png (69.5 kB)
1.png (83.0 kB)
5.png (6.9 kB)
more ▼

asked Apr 09 '19 at 11:40 AM in Blueprint Scripting

avatar image

Colatran
36 6 4 8

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi there, does it work if you check the "Simulation Generates Hit Events" tick above the PhysMat slot in your component?

more ▼

answered Apr 09 '19 at 12:32 PM

avatar image

duderseb
503 2 9 7

avatar image Colatran Apr 09 '19 at 12:46 PM

no, it dosen't

avatar image duderseb Apr 09 '19 at 12:51 PM

Ok, is the same setting checked in the component you are checking with? Are both set to Block each other's collision ObjectType? If you need them to overlap try running this check with an OnComponent Begin Overlap event instead.

avatar image Colatran Apr 09 '19 at 03:25 PM

the setting is checked in both,

they block each others collision obj type

with overlap the same thing happens:/

avatar image Colatran Apr 09 '19 at 03:31 PM

ok I just found out what it is:

alt text

set this in both

avatar image duderseb Apr 09 '19 at 03:33 PM

Oh great! Glad that worked! Disregard my last comment then :) Cheers

avatar image Colatran Apr 09 '19 at 04:02 PM

cheers. :)

avatar image duderseb Apr 09 '19 at 03:32 PM

I'm away from UE to replicate this but I believe the reason you can't get it is that you're grabbing the PhysMat right out of the HitResult, which may correspond to the root or actor and not the specific component you want to test against. From the OtherComponent (or the Hit Component) pin, can you drag out a Get Physical Material node? Then check for the Surface Type off that.

(comments are locked)
10|2000 characters needed characters left
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