Announcement

Collapse
No announcement yet.

Changing Object Material

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changing Object Material

    Hello everyone,

    I'm trying to change an object material in-game, and I can do this correctly using the material editor, 2 multipliers, 1 add and 2 scalar parameters.

    Then I use a material instance to change the scalars to 1 and 0, and the material changes.~


    The problem with this method is that it does not work with ios, since I'm force to do a auto-flatten and the material stays the same...

    Anyonde knows of an alternative method to change the material in-game?

    #2
    Hi CatWare,

    In my iOs game I'm doing the same using the Set Material kismet node. Works like a charm to change an object's material upon touching it.

    Comment


      #3
      And does it produce shadows? It stops making shadows if I change the object to a interpactor... :/

      Comment


        #4
        I use:

        Code:
        var Material ChosenMaterial;
        
        Pawn.Mesh.SetMaterial(0, ChosenMaterial);
        
        defaultproperties
        {
                ChosenMaterial=Material'MyPackage.Materials.Mat_ChosenMaterial'
        }

        Comment


          #5
          Can you use a static mesh with that code?

          Comment


            #6
            SetMaterial should work just the same. I believe the latest update for UDK now allows you to use MICs properly for iOS.

            Comment

            Working...
            X