This may be a dumb question? If so thats ok but is there a way to make a raycast thicker?
Instead of a thin radius is it possible to give it a thicker radius?
var power : float = 500.0;
var powerY : float = 200;
function Update ()
{
var hit : RaycastHit;
var geneStealer : GameObject;
var ray : Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
//Cant see it lol//Debug.DrawRay(Input.mousePosition, Vector3.forward * 50, Color.green);
// (Vector3(Input.mousePosition.x, Screen.height - Input.mousePosition.y,0)
var fwd = transform.TransformDirection (Vector3.forward);
if (Physics.Raycast (ray, hit, 50) Input.GetButtonDown ("Fire1"))
{
var hitEnemy : GameObject = hit.collider.gameObject;
if (hitEnemy.tag == "ball")
{
transform.rigidbody.isKinematic = false;
transform.rigidbody.AddForce(Vector3(0,powerY,power));
}
}
}
The code above is what Im using which may not be relevant, but just in case this is what I got ![]()