docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct Material

    Describes how an object should respond to collisions with other objects.

    Implements
    IEquatable<Material>
    Inherited Members
    ValueType.Equals(object)
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Physics
    Assembly: Unity.Physics.dll
    Syntax
    public struct Material : IEquatable<Material>

    Fields

    CustomTags

    The custom tags set by the user.

    Declaration
    public byte CustomTags
    Field Value
    Type Description
    byte

    Default

    (Immutable) A default material.

    Declaration
    public static readonly Material Default
    Field Value
    Type Description
    Material

    Friction

    The friction.

    Declaration
    public float Friction
    Field Value
    Type Description
    float

    FrictionCombinePolicy

    The friction combine policy.

    Declaration
    public Material.CombinePolicy FrictionCombinePolicy
    Field Value
    Type Description
    Material.CombinePolicy

    Restitution

    The restitution.

    Declaration
    public float Restitution
    Field Value
    Type Description
    float

    RestitutionCombinePolicy

    The restitution combine policy.

    Declaration
    public Material.CombinePolicy RestitutionCombinePolicy
    Field Value
    Type Description
    Material.CombinePolicy

    Properties

    CollisionResponse

    Gets or sets the collision response.

    Declaration
    public CollisionResponsePolicy CollisionResponse { get; set; }
    Property Value
    Type Description
    CollisionResponsePolicy

    The collision response.

    EnableMassFactors

    Get or Set EnableMassFactors

    Declaration
    public bool EnableMassFactors { get; set; }
    Property Value
    Type Description
    bool

    If true, the object can have its inertia and mass overridden during solving.

    EnableSurfaceVelocity

    Get or Set EnableSurfaceVelocity.

    Declaration
    public bool EnableSurfaceVelocity { get; set; }
    Property Value
    Type Description
    bool

    If true, the object can apply a surface velocity to its contact points..

    Methods

    Equals(Material)

    Tests if this Material is considered equal to another.

    Declaration
    public bool Equals(Material other)
    Parameters
    Type Name Description
    Material other

    The material to compare to this object.

    Returns
    Type Description
    bool

    True if the objects are considered equal, false if they are not.

    GetCombinedFriction(Material, Material)

    Get a combined friction value for a pair of materials. The combine policy with the highest value takes priority.

    Declaration
    public static float GetCombinedFriction(Material materialA, Material materialB)
    Parameters
    Type Name Description
    Material materialA

    The material a.

    Material materialB

    The material b.

    Returns
    Type Description
    float

    The combined friction.

    GetCombinedRestitution(Material, Material)

    Get a combined restitution value for a pair of materials. The combine policy with the highest value takes priority.

    Declaration
    public static float GetCombinedRestitution(Material materialA, Material materialB)
    Parameters
    Type Name Description
    Material materialA

    The material a.

    Material materialB

    The material b.

    Returns
    Type Description
    float

    The combined restitution.

    GetHashCode()

    Calculates a hash code for this object.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for this object.

    Overrides
    ValueType.GetHashCode()

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)