playMaker

Author Topic: How to ease colour from current colour?[SOLVED]  (Read 6844 times)

ETGgames

  • Junior Playmaker
  • **
  • Posts: 56
    • ETGgames
How to ease colour from current colour?[SOLVED]
« on: August 07, 2015, 06:17:51 AM »
I have an object, and I need it to ease into a opaque colour from a colour with 0 alpha. However, I want colour to start at the object's current colour.
« Last Edit: November 30, 2017, 01:16:01 AM by jeanfabre »

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: How to ease colour from current colour?
« Reply #1 on: August 07, 2015, 07:27:57 AM »
Check out dotween, the color actions does this...

ETGgames

  • Junior Playmaker
  • **
  • Posts: 56
    • ETGgames
Re: How to ease colour from current colour?
« Reply #2 on: August 07, 2015, 10:54:52 AM »
What's dotween?  I assume u mean itween.  There is no colour action under itween for me?

Sid

  • Playmaker Newbie
  • *
  • Posts: 32
Re: How to ease colour from current colour?
« Reply #3 on: August 07, 2015, 12:45:02 PM »
DOTween:
http://hutonggames.com/playmakerforum/index.php?topic=10303.0
https://www.assetstore.unity3d.com/en/#!/content/27676

Do a "Get Color RGBA" first to "Store Alpha" float value.  Then ease from whatever that float value is to 1 using "Ease Float" (Every Frame) while you "Set Color RGBA" (Every Frame) with that variable.

Sid

clandestine

  • Sr. Member
  • ****
  • Posts: 255
    • ЯKD.ZONE
Re: How to ease colour from current colour?
« Reply #4 on: August 08, 2015, 05:38:31 AM »
LeanTween also works perfectly, im doing text and image fades for a mobile game and it works. The PM actions are not free though.
« Last Edit: August 08, 2015, 06:52:57 AM by clandestine »

ETGgames

  • Junior Playmaker
  • **
  • Posts: 56
    • ETGgames
Re: How to ease colour from current colour?
« Reply #5 on: August 08, 2015, 08:37:53 AM »
So you guys are telling me that a simple ease colour is not built into playmaker?? I'm pretty sure it is... I have ease float set colour and get colour already in my action browser. However, I really don't know how to use it - whats a colour variable? how do i connect the colour of the object to a colour?

clandestine

  • Sr. Member
  • ****
  • Posts: 255
    • ЯKD.ZONE
Re: How to ease colour from current colour?
« Reply #6 on: August 08, 2015, 12:22:47 PM »
OK, the key here is to choose a material with alpha channel, could be transparent diffuse, you don't need a texture with alpha

then you create your color variable, just create a variable and choose color as the type

then compose you action like this... or in any way you want but make sure to set the material color to the variable and update it every frame to see the animation


the result should be like this

the cube is orange at the beginning because i set the color var orange and change it to green and transparent at the same time. To fade the object without changing the color, you just set the alpha in the 'To Value' field

ETGgames

  • Junior Playmaker
  • **
  • Posts: 56
    • ETGgames
Re: How to ease colour from current colour?
« Reply #7 on: August 10, 2015, 10:01:37 AM »
Thanks so much I needed that!