I am trying to make a default Blob-shadow appear on the ground elements, but not on the bushes etc.
The game is build up from a sort of tilesetup. As every object is imported in FBX format and we have rather many, I would like to use scripts to put the objects into certain layers.
I have a layer 11 I’ve named “NoShadow”. This layer I want to put my bush into.
// spawn the new object
go = (GameObject)GameObject.Instantiate( (GameObject)ModelController.raw[ ModelController.items_object[ objectList[cnt].index ].index], pos , rot);
go.transform.Translate( pos2 );
go.transform.parent = goParent.transform;
go.layer = 11;
I’ve tried with other layers too, but no result unless I pick default in the projector. Then every shadow is gone???
Only the object(s) with a (Mesh)Renderer need their layer set.
– Wazyes, you mean that the top level object (parent) doesnt need to have its layer set. I agree, but it was just my quick solution to do it recursively.
– BerggreenDK