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"

Change material to be the same as collided object material

I am trying to construct a blueprint that changes the material variable of an object to the same material as the object that has been collided with.

(For example; if a blue ball hits a red wall, the wall will then be blue.)

The desired functionality is as follows;

  1. Projectile hits the wall, the walls material changes to the material of the projectile.

  2. The second projectile hits the wall, wall changes material to that projectiles material.

  3. Repeat with any number of projectiles and materials.

For the desired functionality, the wall needs to be able to know what material it needs to change to as the projectile collides with it, not before. The wall needs to actively seek out the material it needs to change to without having a direct reference to that material from the get-go.

I've been messing around for a while trying to get this to work an came up with a way to change the walls material, but the material that it is changed to is the generic checker default, not the material of the projectile.

As I'm relatively new to the Unreal Engine and Blueprint I'm probably missing something fairly basic, I've look through the documentation in the areas I believe to fit my issue and am at a loss. So any help would be appreciated.

Product Version: Not Selected
more ▼

asked Apr 22 '18 at 11:03 AM in Blueprint Scripting

avatar image

3 1 4

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

1 answer: sort voted first

Wouldn't something that simple work for you:

alt text

This could be placed in the wall actor/component.

capture.png (58.6 kB)
more ▼

answered Apr 22 '18 at 11:24 AM

avatar image

15.2k 77 25 62

avatar image Mercuranus Apr 22 '18 at 01:49 PM

Okay, so I did try that. It didn't work because, for some reason, I had put a random collider around my projectile blocking the material on it from ever making contact. In short yes this worked, thank you for clearing that up.

avatar image Mercuranus Apr 22 '18 at 01:52 PM

I now know why I put it there. Still learning, expect more of these embarrassing questions. Thanks again.

(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