Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: xunxun on October 16, 2013, 03:35:46 AM

Title: How to set "Alpha cutoff" material?[SOLVED]
Post by: xunxun on October 16, 2013, 03:35:46 AM
How can I set variable "Alpha cutoff" in material component?

Pls, take a look on the screenshot below.

I tried to drag and drop that into a FSM state but I could't find any relative variable, something like "_Cutoff", "Alpha", "Material Float"

this script seems to work but it doesn't
Code: [Select]
renderer.material.SetFloat("_cutoff", 0.5f);
Title: Re: How to set "Alpha cutoff" material?
Post by: jeanfabre on October 17, 2013, 01:44:46 AM
Hi,

 You must respect capital, it's _Cutoff not _cutoff

 Use "set Materal Float" action to access that and put in the "Named Float" "_Cutoff" to control that.

 to get the proper list of materials properties, select a material and click "edit" in the component inspector, you will get a listing of the shader props including its properties.

Bye,

 Jean
Title: Re: How to set "Alpha cutoff" material?
Post by: xunxun on October 17, 2013, 01:52:24 AM
Thank you much Jean,

How is it simple that much :D

it's solved in seconds ^__^