Show / Hide Table of Contents

    Raycast

    Basic raycasting can be done by calling @Engine4.Physics.Physics4.Raycast(Engine4.Physics.RaycastHit4). You can get Physics4 easily with physics4 when deriving your mono from MonoBehaviour4.

    RaycastHit4 hit = physics4.Raycast(new Ray4(transform4.position, transform4.overward));
    if (hit.hit)
    {
        // Raycast succeeded!
    }
    
    ▲ Copyright © 2017 Wello Soft