We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Change material to the clicked object

Home Forums Puzzles Change material to the clicked object

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #15739
    michsaporito
    Participant

    I there! I’m testing this incredible Verge3D before buy it..
    I have a trouble..
    I would like in my scene select a part of a object with mouse click for select only that part of object and then click on a sphere material for assign that new material to the selected object.
    Wich the puzzle functions for made this?
    Thanks in advance…

    #15740

    Hi,

    take a look at the variables https://www.soft8soft.com/docs/manual/en/puzzles/Variables.html

    basically you can remember which object part is clicked in a variable. Then you can use this variable to assign a material to it.

    Chief 3D Verger | LinkedIn | Twitter

    #15741
    michsaporito
    Participant

    Mmmmmmh… I try! thanks a lot for the moment..

    #15746
    michsaporito
    Participant

    Emh.. I tried.. but..
    I have a base scene with base materials.. (1)
    If I select my sphere Black material selection (2) and I click on the part of the object work perfect and the object turn on black..
    But.. If I select my sphere Chrome material and click onte the part of the object turn always in black.. (3)
    I dont’understand..
    Thanks

    #15754
    michsaporito
    Participant

    I tried with this changed condition.. but without success..
    The second IF ELSE it’s not looky.. :wacko:

    #15756

    Your puzzles seem correct to me. Do the materials get assigned if you don’t use any if-else logic?

    Chief 3D Verger | LinkedIn | Twitter

    #15757
    michsaporito
    Participant

    Thanks for your attention and your help..
    I changed with this.. but nothing..
    In the first case:
    If I click Camo Sphere the object change in Camo (because direct to the object)
    If I Click Black Sphere the object change in Black
    If I Click Silver Sphere the object change always in Black
    But… but.. incredible..
    In the second case:
    If I changed the visual script and invert the position and i put the Chrome in second place changed only in Chrome.. nomore in Black..
    So I understand that the first IF don’t work..

    #15760

    Got it. You assign other variables as values, and they are initially undefined. Instead, try assigning Text puzzles to your status variable.

    Chief 3D Verger | LinkedIn | Twitter

    #15761
    michsaporito
    Participant

    I tried to change to “TEXT” variable… with twice version..
    “MAT_STATUS” to “BLACK”
    MAT_STATUS to “BLACK”
    Nothing.. :unsure:
    Only the last IF (CHROME in this case) work… Black dont’Work
    But If I move the Black to the last the CHROME dont’t work.. and work the Black..
    Incredible..

    #15768

    looks like you’re still using variables (red puzzles) as values. The Text puzzles are green (see the Text category).

    Chief 3D Verger | LinkedIn | Twitter

    #15770
    michsaporito
    Participant

    Oh my god.. so I’ll tomorrow try with green Text Puzzles!
    Thanks in advance again!!!
    You’re a gentleman…See you

    #15777
    michsaporito
    Participant

    Great Youri! with your effort and help, now all works with charme! :good:
    This Verge3D is a powerfull and incredible tool.. I want it!
    Thanks again, you’ve a nice day :bye:
    Michele

    #15780

    :good:

    Chief 3D Verger | LinkedIn | Twitter

    #15781
    michsaporito
    Participant
Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.