Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PhysicsRaycastResult

Index

Constructors

Properties

The Physics body that the ray hit

bodyIndex?: number

The body Index in case the Physics body is using instances

Accessors

  • get hasHit(): boolean
  • Gets if there was a hit

    Returns boolean

  • get hitDistance(): number
  • Gets the distance from the hit

    Returns number

  • Gets the hit normal/direction in the world

    Returns Vector3

  • Gets the hit point in the world

    Returns Vector3

  • Gets the ray "start point" of the ray in the world

    Returns Vector3

  • Gets the ray "end point" of the ray in the world

    Returns Vector3

  • get triangleIndex(): number
  • Returns number

Methods

  • calculateHitDistance(): void
  • Calculates the distance manually

    Returns void

  • Resets all the values to default

    Parameters

    • Optional from: Vector3

      The from point on world space

    • Optional to: Vector3

      The to point on world space

    Returns void

  • setHitData(hitNormalWorld: IXYZ, hitPointWorld: IXYZ, triangleIndex?: number): void
  • Sets the hit data (normal & point in world space)

    Parameters

    • hitNormalWorld: IXYZ

      defines the normal in world space

    • hitPointWorld: IXYZ

      defines the point in world space

    • Optional triangleIndex: number

    Returns void

  • setHitDistance(distance: number): void
  • Sets the distance from the start point to the hit point

    Parameters

    • distance: number

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme