Hay guys, I'm learning about Ray Casting and i wonder if this is possible, and how i would go about doing it.
I have an Object which acts as a character (see fig.1)

Fig 1
When i press a button i want to perform a ray cast (all 360 deg from the Object) and actually draw the ray cast (fig.2)

Fig 2
This will then obivously interact with any objects within the raycast (Fig 3)

Fig 3
How would i go about doing this?
Joshua
2
I would forget about raycasting for this. I would use a spherecollider or a trigger to see if there are objects within range r of your cube.
For the rendering I would set up an empty gameobject. Attach an Ellipsoid Particle Emitter, Particle Animator and a Trail Renderer. Then attach the script:
var Cube : Transform;
function Update () {
transform.RotateAround(Cube,Vector3.up,Time.deltaTime);
}
Child this Object to the cube at 0,0,r. Of course program in that it'll be activated on the press of a button.
Good luck.