Announcement

Collapse
No announcement yet.

SkeletalMeshComponent:SetColorParameterOnMaterials "Skin Color" only changing face color

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SkeletalMeshComponent:SetColorParameterOnMaterials "Skin Color" only changing face color

    Hello,

    i use the code below to change skin color for new player creation :

    SkeletalMeshComponent:SetColorParameterOnMaterials ("Skin Color", FLinearColor(r or 0, g or 0, b or 0, a or 0))

    but it is only changing the face color, i already have seen videos where players had hands and torso in the same color as face too. Before i set the Skin Color , first i execute :

    SkeletalMeshComponent:SetMaterial(3, UMaterialInterface.LoadFromAsset("/Game/CharacterModels/Materials/HZN_Materials/M_HZN_Body_NoShoesLegsTorso")

    Is there "Hand Color" "Torso Color" too ? or what i'm missing?

    #2
    Apply the color before you set the material.

    Code:
    SkeletalMeshComponent:SetMaterial(3, UMaterialInterface.LoadFromAsset("/Game/CharacterModels/Materials/HZN_Materials/M_HZN_Body_NoShoesLegsTorso")
    SkeletalMeshComponent:SetColorParameterOnMaterials ("Skin Color", FLinearColor(r or 0, g or 0, b or 0, a or 0))

    Comment


      #3
      nah.. nothing different.


      i am using Frederic "onsetRP" framework to build a RP server....

      i'm using his character creation... it creates the player with the skin color i want , but then at the end of the code... he calls a function to update other players with your clothing...(the same functions when you log and your clothes are retrieved from DB and loaded to player) .. in that moment when it executes the 2 lines above... no matter the order, it will set arms/hands/torso to the default color

      i guess i will post an issue on his git

      Comment

      Working...
      X