Search Unity

Need Verbose Raycasting Example

Discussion in 'Scripting' started by marty, Jun 7, 2005.

  1. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    If someone has the time, could you please post an example of a simple raycast (like the "raycast surface tracker" in the Unity scripting samples) that uses the various RayCastHit return values (i.e. normal, distance, point, etc.).

    I've been programming Director Lingo so long, my JavaScript is pretty rusty. ;-)

    Specifically, I'd like to see how to pull these values from the RayCastHit call, as well as how to monitor their values in the property inspector.

    All I need is the code, but feel free to provide a scene or small project.

    Thanks mucho!
     
  2. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    Take a look at the CreateParticleSystem script - that uses the parameters returned...

    Otherwise, I'll be happy to make a more specific example...
     
  3. applejuices

    applejuices

    Joined:
    Nov 20, 2013
    Posts:
    80