Hello everybody, I'm new here and have a problem I can't solve on my own. I'm making a maze first person game where the player have the opportunity to place boms and shoot at obstacles. The shooting in the game works fine but the bom placing not. The problem is that when a bom is placed it need to shoot a raycast in all directions (front, back, right en left) en when a ray hits i doesn't scale in that direction and when the ray doesn't hit it scales in that direction. I have a empty game object called "BomSpawner" on location 0,0,0 for the bom spawning. I also have a empty game object called "BomPlace" attached to the player for the location of the bom. For the explosion I use a cube that spawns at the location of the bom. This is the script I use Code (CSharp): usingUnityEngine; usingSystem.Collections; publicclassBomScript : MonoBehaviour { //Locatievandeplayerofenemybom publicTransformplayerBom; publicTransformenemyBom; //Bomvariables publicfloatbomTimer; publicfloatexplosieTimer; publicGameObjectexplosie; publicGameObjectbomPrefab; //Bomraycastsvariables publicfloatrange; publicfloatmaxDistance; //Usethisforinitialization voidStart () { } //Updateiscalledonceperframe voidUpdate () { RaycastHitenemyHit; RaycastHithit1; RaycastHithit2; RaycastHithit3; RaycastHithit4; Rayfront = newRay (playerBom.position, Vector3.forward); Rayback = newRay (transform.position, Vector3.back); Rayright = newRay (transform.position, Vector3.right); Rayleft = newRay (transform.position, Vector3.left); if (Input.GetMouseButtonDown (0)) { //Playerbom GameObjectbom = Instantiate (bomPrefab, playerBom.position, playerBom.rotation) asGameObject; GameObjectexp = Instantiate (explosie, playerBom.position, Quaternion.identity) asGameObject; StartCoroutine(DestroyBom()); StartCoroutine(DestroyExplosie()); /*RayCastbasis: Physics.Raycast (vector3origin, vector3direction, raycasthit, hitinfo, floatdistance, intlayermask */ //http://unity3d.com/learn/tutorials/modules/beginner/physics/raycasting if(Physics.Raycast (playerBom.position, Vector3.forward, outhit1, range)) { GameObject.FindGameObjectWithTag("Explosie").transform.localScale += newVector3 (0.1f, 0, 0); } if(Physics.Raycast (playerBom.position, Vector3.back, outhit2, range)) { GameObject.FindGameObjectWithTag("Explosie").transform.localScale += newVector3 (-0.1f, 0, 0); } if(Physics.Raycast (playerBom.position, Vector3.right, outhit3, range)) { GameObject.FindGameObjectWithTag("Explosie").transform.localScale += newVector3 (0, 0.1f, 0); } if(Physics.Raycast(playerBom.position, Vector3.left, outhit4, range)) { GameObject.FindGameObjectWithTag("Explosie").transform.localScale += newVector3 (0, -0.1f, 0); } } /* //Enemyraycastalsplayerrangeindebuurtkomt if (Physics.Raycast (transform.position + (newVector3 (0, 1.0f, 0)), transform.forward, outenemyHit, range)) { Instantiate (bomPrefab, enemyBom.position, enemyBom.rotation); Instantiate (explosie, enemyBom.position, Quaternion.identity); StartCoroutine (DestroyBom ()); Debug.Log("hit"); } */ } IEnumeratorDestroyBom() { yieldreturnnewWaitForSeconds (bomTimer); Destroy (GameObject.FindWithTag("Clone")); } IEnumeratorDestroyExplosie() { yieldreturnnewWaitForSeconds (explosieTimer); Destroy (GameObject.FindGameObjectWithTag ("Explosie")); } } PS: if my english is bad, excuse me