Help Settexture Doesn't Work

Discussion in 'Buildbox 3.0' started by mourad, Apr 19, 2020.

Tags:
  1. mourad

    mourad Boxer

    Joined:
    Oct 15, 2019
    Messages:
    6
    Likes Received:
    0
    Hi,

    I use this method SetTecture() with name of texture present in sprite editor but not work with my character Fbx texture doesn't change.
    but when i try remove() or scale() method its works correctly
    this is my code
    let players = this.scene().find("player1");
    if(players.length==1 && players[0].isCharacter()){
    let player=players[0];
    player.setTexture('069');
    }

    setTexture(name)
    Applies a new texture to all 3D Models within the Entity. The texture should be present in Sprite Editor.

    Parameters
    string name – The name of the texture to be applied.

    if(health <=0.5){
    this.entity().setTexture('Damaged Texture');
    }
     
  2. Vlad-NY

    Vlad-NY Serious Boxer

    Joined:
    Jul 21, 2018
    Messages:
    605
    Likes Received:
    361
    setTexture(name)
    Applies a new texture to all 3D Models within the Entity. The texture should be present in Sprite Editor.

    Answer: fbx = subscene not 3D Models so you are trying to use something that is not yet supported. That's why it's not working.
     
    Josh (Nology Games) likes this.

Share This Page