Material Struct -> create own substances.

Post and discuss features you'd like to see in the BEPUphysics library.
Post Reply
Mindrage
Posts: 11
Joined: Mon Oct 24, 2011 8:16 pm

Material Struct -> create own substances.

Post by Mindrage » Wed Oct 26, 2011 4:19 pm

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?

Norbo
Site Admin
Posts: 4558
Joined: Tue Jul 04, 2006 4:45 am

Re: Material Struct -> create own substances.

Post by Norbo » Wed Oct 26, 2011 8:09 pm

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 :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest