Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: ExprSt on November 21, 2013, 02:17:30 PM
-
Hi,
I wish to creat a scene where appears the following:
1) Player click with the mouse on a Buttom;
2) An object appears - but, and here is where I'm stucked, I wish that the object which is created is spawn slowly, from 0% visibility to 100%;
3) I also wish this object that is spawn to move while it's becoming more visible to the player.
May anyone help?
Regards.
-
Create the object and change the alpha on the material its using from 0 - 255 over time.
-
Great!
But how do I change de alpha?
-
Hi,
you need to have a material with a transparency setting ( the default diffuse doesn't) and then you can animate that alpha property using "set Material Color" or "set Material float" action.
Bye,
Jean
-
I tried it but I don't see where to put the "Time" variable.
May you help longer?
-
I faced this same challenge. I wasn't able to locate a "change over X amount of time" variable, so here's my workaround (not the best, but it works)
Let's say you're starting at 0% opacity and want to end at 100% opacity. Let's say your material is "concrete".
I would take the material and duplicate it 10 times, and name each one "concrete0", "concrete10", "concrete20" etc all the way up to "concrete100". Each material has the same color/texture, but has its opacity set to the proper value (concrete10 has 10% opacity, etc).
My FSM would use the "set material color" action, set it to concrete 0 on start, wait X amount of time (using the wait action), and then go to a new state, where it assigns "concrete10", waits the same amount of time again, and then sets it to "concrete20", etc.
You can change the speed and smoothness of the opacity transition by adding more materials with smaller changes in opacity, and changing the "wait" time between each state.
Again, I'm sure there's a better way, but this was my clumsy method :D
-
Hi,
Ok, study the sample I attached to this post, it fades a material as you click on the object and back when you release.
bye,
Jean
-
Outstanding!!!!
Thanks!