How to change the color of an entity

mattm

29-05-2007 15:44:11

Hi!
The subject is in the title!
I have an entity. I would like to change the color of its material.
I 've tried to create a SubNode, where to attach this material, because my entity doesn't have a "getMaterial()" method:
SubEntity subEntity_;
subEntity_=entity_.GetSubEntity(0);
subEntity_.getMaterial().setDiffuse(0.2f, 0.4f, 0.1f);

The problem is that the setDiffuse method doesn't exist either in subEntity....
:?

mattm

30-05-2007 11:56:12

up! :D

mickey

02-01-2009 05:55:38

Hi

I just want to revive this post apparently right now I'm looking for a way to change a entity's material color in real-time? I want it to slowly fade to black?

Any ideas?

Thanks.