melonJS
    Preparing search index...

    Interface RaycastHit3d

    Result of a successful PhysicsAdapter.raycast3d. Same shape as RaycastHit, with Vector3d in place of Vector2d. 3D adapters approximate each renderable's collision volume as a bounding sphere centred on renderable.getAbsolutePosition() with radius = the renderable's bounds circumradius — same model Camera3d.isVisible uses for frustum culling.

    interface RaycastHit3d {
        fraction: number;
        normal: Vector3d;
        point: Vector3d;
        renderable: Renderable;
    }
    Index

    Properties

    fraction: number

    position along the ray, 0..1 from from to to

    normal: Vector3d

    surface normal at the hit point (outward from sphere centre)

    point: Vector3d

    world-space hit point (sphere entry)

    renderable: Renderable

    the renderable the ray hit