Dynamically Changing Object Opacity

Discussion in 'How Can I...?' started by Rattlehead, Jun 28, 2018.

Tags:
  1. Rattlehead

    Rattlehead Boxer

    Joined:
    Dec 27, 2017
    Messages:
    35
    Likes Received:
    14
    Wow, I am surprised that this is as hard as it is turning out to be... :)
    I have areas of my level where I have objects covering gameplay elements and I only want displayed as the player progresses through the level.

    I have tried using the Transform logic component but it doesn't seem to allow you to modify the Opacity of the object based on distance.

    Is changing the opacity on the fly possible? Any hints would be greatly appreciated.

    Thanks!
     
  2. Lamora

    Lamora Avid Boxer

    Joined:
    Dec 8, 2016
    Messages:
    282
    Likes Received:
    140
    If I understand correctly you want some object to disappeare/move away when character is getting close ?

    You can use Wake Up component for this
     
  3. Rattlehead

    Rattlehead Boxer

    Joined:
    Dec 27, 2017
    Messages:
    35
    Likes Received:
    14
    Thanks Lamora.

    Yes, that’s exactly what I am trying to do. I have an object that I want to disappear once the player moves close to it. I thought I’d looked at the Wake Up component and didn’t see an opacity option. I’ll check it again tonight.

    Thanks for responding!
     
  4. Lamora

    Lamora Avid Boxer

    Joined:
    Dec 8, 2016
    Messages:
    282
    Likes Received:
    140
    A ok you want opacity, ok i get it now, there is some trick for it

    You have to attached logic piece to character on game start level so it will move with character on that logic piece you can put opacity of that object to 0
     
  5. Rattlehead

    Rattlehead Boxer

    Joined:
    Dec 27, 2017
    Messages:
    35
    Likes Received:
    14
    I was thinking the same thing as well but the Transform logic piece doesn't seem to have the ability to change the Opacity.

    Thanks again for your help!
     
  6. Rattlehead

    Rattlehead Boxer

    Joined:
    Dec 27, 2017
    Messages:
    35
    Likes Received:
    14
    Ok, I was able to move the object by changing the Linear Velocity Modifier. I think I can maybe find a way to fade it out with an animation (maybe damage?).

    Hopefully the Transform piece will eventually support Opacity.
     

Share This Page