playMaker

Author Topic: Getting an animation the slowly fade away?  (Read 1346 times)

ilovelessons

  • Junior Playmaker
  • **
  • Posts: 70
Getting an animation the slowly fade away?
« on: June 02, 2017, 11:06:56 PM »
Hi,

I made an animation of a diamond for a game (its a reward for when you accomplish something).  I managed to make it rise slowly by adding a rigid body to it and changing the gravity to -5.  However as it rises it need to slowing fade out of existence (i.e. I need to the alpha to slowly be reduced to zero). Anyone knows what function/action I need to use in Playmaker?

Thanks

Doh

  • Full Member
  • ***
  • Posts: 124
Re: Getting an animation the slowly fade away?
« Reply #1 on: June 05, 2017, 07:14:03 AM »
You could use "ease float" to animate a variable for use as your alpha value.

Create 3 floats:

a) representing your maximum alpha value
b) representing your minimum alpha value
c) representing your current alpha value (the one to be animated)

"a" would be the "From Value", "b" would be the "To Value" and "c" would be the "Float Variable". The "Ease Float" action allows you to tweak a few parameters of the animation too.

So to then use this animated float as your alpha channel value, apply a "Set Color RGBA" action to the same state.

This is one of a number of methods you could use.