cubos::engine::PhysicsMaterial struct

Component which defines the friction and bounciness of a body.

Public types

enum class MixProperty { Maximum, Multiply, Minimum, Average }
Type of mixing for the material property. When mixing between bodies with different types, the priority is taken into account. The priority is as defined in the enum, lower priority takes precedence.

Public variables

float friction
Static and Dynamic friction coefficient for the body. Range between 0, for no friction, and 1, for maximum friction.
float bounciness
Bounciness of the body. Range between 0, for no bounce, and 1, for maximum bounce.
MixProperty frictionMix
Type of value mixing for friction, according to MixProperty.
MixProperty bouncinessMix
Type of value mixing for bounciness, according to MixProperty.

Enum documentation

enum class cubos::engine::PhysicsMaterial::MixProperty

Type of mixing for the material property. When mixing between bodies with different types, the priority is taken into account. The priority is as defined in the enum, lower priority takes precedence.

Enumerators
Maximum

Use highest property value | Priority 0.

Multiply

Multiply property values | Priority 1.

Minimum

Use lowest property value | Priority 2.

Average

Use the average of property values | Priority 3.