Page 1 of 1
					
				Material Struct -> create own substances.
				Posted: Wed Oct 26, 2011 4:19 pm
				by Mindrage
				Lets say you make all shapes have a material param in thier contructor which makes them have predifined bounciness, friction, density and all personal information of a substance.
Why not make some kind of material structor that reduses the line of code?
And maybe make terrain have thier own material depending on thier height position?
			 
			
					
				Re: Material Struct -> create own substances.
				Posted: Wed Oct 26, 2011 8:09 pm
				by Norbo
				Lets say you make all shapes have a material param in thier contructor which makes them have predifined bounciness, friction, density and all personal information of a substance.
Why not make some kind of material structor that reduses the line of code?
There actually does exist a Material object, and you can re-use Material objects for multiple objects.  It defines static and kinetic friction and bounciness.  Mass/density is left out because it frequently varies independently of the friction and bounciness.
And maybe make terrain have thier own material depending on thier height position?
That is a little too game-specific to build directly into the engine.  If someone wants a height-varying material, it would be best for them to make a couple of modifications to the Terrain's handling of materials rather than creating an omni-system which can handle all sorts of different nonstandard material behaviors.  "Overdesigning" can be deadly 
