You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should make it possible to configure the default values used for friction and restitution. It's annoying to set each body's friction separately if your world is full of ice, for example.
While we can't change the value returned by e.g. Restitution::default() at runtime, it should be very straightforward to do in the PreparePlugin when initializing missing components for bodies and colliders. We can store the default values in resources and use them for the default values of the components.
Naming
How do we want to name the resources? Do we want each component to have a separate resource, or should we group properties together?
Here are a few ideas:
// All separatestructDefaultFriction(Friction);structDefaultRestitution(Restitution);structDefaultLinearDamping(Scalar);structDefaultAngularDamping(Scalar);// GroupedstructDefaultMaterialProperties{friction:Friction,restitution:Restitution,}structDefaultDamping{linear:Scalar,angular:Scalar,}// All togetherstructDefaultPhysicsProperties{friction:Friction,restitution:Restitution,linear_damping:Scalar,angular_damping:Scalar,}
The Default could also be replaced by Global or World, whichever one is more clear.
Personally, I prefer the first option of using separate resources, since it's a bit more explicit and consistent in terms of our naming conventions, but if others have different ideas, feel free to share.
The text was updated successfully, but these errors were encountered:
We should make it possible to configure the default values used for friction and restitution. It's annoying to set each body's friction separately if your world is full of ice, for example.
While we can't change the value returned by e.g.
Restitution::default()
at runtime, it should be very straightforward to do in thePreparePlugin
when initializing missing components for bodies and colliders. We can store the default values in resources and use them for the default values of the components.Naming
How do we want to name the resources? Do we want each component to have a separate resource, or should we group properties together?
Here are a few ideas:
The Default could also be replaced by Global or World, whichever one is more clear.
Personally, I prefer the first option of using separate resources, since it's a bit more explicit and consistent in terms of our naming conventions, but if others have different ideas, feel free to share.
The text was updated successfully, but these errors were encountered: