docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Struct RayPerceptionInput

    Contains the elements that define a ray perception sensor.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.MLAgents.Sensors
    Assembly: solution.dll
    Syntax
    public struct RayPerceptionInput

    Fields

    Name Description
    Angles

    List of angles (in degrees) used to define the rays. 90 degrees is considered "forward" relative to the game object.

    CastRadius

    Radius of the sphere to use for spherecasting. If 0 or less, rays are used instead - this may be faster, especially for complex environments.

    CastType

    Whether to perform the casts in 2D or 3D.

    DetectableTags

    List of tags which correspond to object types agent can see.

    EndOffset

    Ending height offset of ray from center of agent.

    LayerMask

    Filtering options for the casts.

    RayLength

    Length of the rays to cast. This will be scaled up or down based on the scale of the transform.

    StartOffset

    Starting height offset of ray from center of agent

    Transform

    Transform of the GameObject.

    UseBatchedRaycasts

    Whether to use batched raycasts.

    Methods

    Name Description
    OutputSize()

    Returns the expected number of floats in the output.

    RayExtents(int)

    Get the cast start and end points for the given ray index/

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023