Search Results for

    Show / Hide Table of Contents

    Class PhysicalMaterial

    Physical materials are used to define the response of a physical object when interacting dynamically with the world.

    Inheritance
    System.Object
    Object
    PhysicalMaterial
    Implements
    ISerializable
    Inherited Members
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [ContentContextMenu("New/Physics/Physical Material")]
    [Unmanaged]
    public sealed class PhysicalMaterial : Object, ISerializable

    Constructors

    PhysicalMaterial()

    Initializes a new instance of the PhysicalMaterial.

    Declaration
    public 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

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat