Class PhysicalMaterial
Physical materials are used to define the response of a physical object when interacting dynamically with the world.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[ContentContextMenu("New/Physics/Physical Material")]
[Unmanaged]
public sealed class PhysicalMaterial : Object, ISerializable
Constructors
PhysicalMaterial()
Properties
Density
Physical material density in kilograms per cubic meter (kg/m^3). Higher density means a higher weight of the object using this material. Wood is around 700, water is 1000, steel is around 8000.
Declaration
[EditorOrder(10)]
[EditorDisplay("Physical Material", null)]
[Unmanaged]
public float Density { get; set; }
Property Value
System.Single
|
Friction
The friction value of surface, controls how easily things can slide on this surface.
Declaration
[EditorOrder(0)]
[Limit(0F, 3.40282347E+38F, 1F)]
[EditorDisplay("Physical Material", null)]
[Unmanaged]
public float Friction { get; set; }
Property Value
System.Single
|
FrictionCombineMode
The friction combine mode, controls how friction is computed for multiple materials.
Declaration
[EditorOrder(1)]
[EditorDisplay("Physical Material", null)]
[Unmanaged]
public PhysicsCombineMode FrictionCombineMode { get; set; }
Property Value
PhysicsCombineMode
|
Restitution
The restitution or 'bounciness' of this surface, between 0 (no bounce) and 1 (outgoing velocity is same as incoming).
Declaration
[EditorOrder(3)]
[Range(0F, 1F)]
[EditorDisplay("Physical Material", null)]
[Unmanaged]
public float Restitution { get; set; }
Property Value
System.Single
|
RestitutionCombineMode
The restitution combine mode, controls how restitution is computed for multiple materials.
Declaration
[EditorOrder(4)]
[EditorDisplay("Physical Material", null)]
[Unmanaged]
public PhysicsCombineMode RestitutionCombineMode { get; set; }
Property Value
PhysicsCombineMode
|
Tag
Physical material tag used to identify it (eg. Surface.Wood
). Can be used to play proper footstep sounds when walking over object with that material.
Declaration
[EditorOrder(100)]
[EditorDisplay("Physical Material", null)]
[Unmanaged]
public Tag Tag { get; set; }
Property Value
Tag
|