Hello everyone
I looked around for this but I could not understand since the answers were all Js and I only work with C#
I have a shotgun and everything is fine it shoots… my problem is I want a realistic spread/ multiple ray cast shooting
can anyone help ? thank you.
void RayShoot () {
Player.animation.Play("ShotgunShoot");
RaycastHit hit;
Vector3 DirectionRay = transform.TransformDirection (Vector3.forward);
Debug.DrawRay (transform.position, DirectionRay*Range, Color.red);
ray = Camera.main.ScreenPointToRay (Input.mousePosition+Random.onUnitSphere);
if(Physics.Raycast(ray , out hit , Range)){
}