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?
Material Struct -> create own substances.
Re: Material Struct -> create own substances.
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.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?
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 deadlyAnd maybe make terrain have thier own material depending on thier height position?
