About Store Forum Documentation Contact



Post Reply 
Changing existing materials variables
Author Message
Spugeson Offline
Member

Post: #1
Changing existing materials variables
How do I change existing materials values? Fe. Glow, in script side. Im pretty confused with this and I couldnt find any help for this, really. :-\
07-16-2010 09:22 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Changing existing materials variables
You should create a helper material in constant memory address (if you don't want to modify global material)

Material marterial;

once at loading time:

material=*Materials("ready material.mtrl");
material.glow=1.0f;
mesh.setMaterial(material);

then during updating:
material.glow=xxx
07-16-2010 01:27 PM
Find all posts by this user Quote this message in a reply
Spugeson Offline
Member

Post: #3
RE: Changing existing materials variables
Thank yous!
07-19-2010 09:16 AM
Find all posts by this user Quote this message in a reply
Post Reply