• Studio

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • API

    Datatypes

    Edit

    RaycastHit

    Stores information returned by a raycast, a technique used to detect objects in a certain path or direction in video games. It contains data such as the hit collider, hit point, surface normal, distance from the ray's origin, etc.

    Properties

    Contains the collider hit by the ray.

    Holds the unique identifier for the collider hit by the ray.

    The point in world space where the raycast hit the collider.

    Gives the normal of the surface hit by the ray.

    Provides the barycentric coordinates of the hit point on the mesh.

    distance

    number

    Refers to the distance from the ray's origin to the hit point.

    Holds the index of the triangle hit by the ray.

    Provides the coordinates of the texture hit by the ray.

    Provides the coordinates of the second texture hit by the ray.

    Provides the Transform of the object that was hit.

    Offers access to the Rigidbody of the hit object, if it has one.

    Provides the coordinates of the lightmap hit by the ray.

    PocketWorlds Icon

    © 2024 Pocket Worlds. All rights reserved.