Options
All
  • Public
  • Public/Protected
  • All
Menu

Holds the data for the raycast result

see

https://doc.babylonjs.com/how_to/using_the_physics_engine

Hierarchy

  • PhysicsRaycastResult

Index

Constructors

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

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): 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

    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
  • Property
  • Method
  • Inherited constructor
  • Static method

Settings

Theme