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"

[Question] How to change materials for vehicle at runtime?

I have a WheeledVehicle Blueprint in which i want to change the materials at runtime. However since its a [ROOT] mesh i cant seem to find a way to change materials at runtime. There is a Mesh Variable inside Vehicle group but i cant use it. When compiling it says Pin Target must have a connection and the target only accepts Character.

I also tried setting the Mesh to None in [ROOT] and added a new SkeletalMeshComponent and tried using it. But then the vehicle wont move. :(

So is there anyway to change materials at runtime for a WheeledVehicle?

Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 02:52 AM in Blueprint Scripting

avatar image

ue4-archive ♦♦ STAFF
49.9k 3660 1983 9111

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

1 answer: sort voted first

Hey Satheesh,

Thanks for your report! Would you be able to post a screenshot of your setup for how you're trying to change materials?

Thanks!

-Steve

more ▼

answered Mar 11 '14 at 02:52 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3660 1983 9111

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:52 AM

Sure thing Steve! Its a very very simple setup like this. I dragged and dropped Mesh node from My Blueprint and compiled: alt text

As you can see the Target for the Mesh node is expecting a character and since the vehicle is extended from Pawn am not sure what to do.

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:52 AM

Hey Satheesh,

It looks like there is an issue with correctly referencing the SkeletalMeshComponent in the WheeledVehicle blueprint class, so I have filed a defect to investigate and fix. If we find a work-around in the meantime, I will update you with that information.

Thanks!

-Steve

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:52 AM

Thank you Steve! :)

(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