Topic: materials and meshes
Hi,
I'm asking this question in the forum so other people can benefit.
I'm trying to create a simple c++ app (starting the ManualUse example) to play a little with the physics and investigate on camera manipulators.
The app simply create a bunch of cubes and make them fall into a box
It has been very simple (with your help...) to setup the scene and make it running; but now I tried to assign a different color to each cube, setting the diffuse value
I tried with the following call:
box->getMesh()->getMaterial(0)->setDiffuse(0.6,0.5,0.4));
but this is affecting all the cubes, not only the one referenced by the *box entity pointer; the reason I believe is that one single mesh is used for all the cubes.
Is there a way to assign a different material to each entity, even if the entities refer to the same mesh?
thanks!!