Hey !
I'm having a issue when I want to instantiate a bullet going from my gun and to infinity.
The bullet gets the right rotation from the code, but not the right force added.
Can anyone help me out ?
Debug.Log("Shoot!");
//GunBlazeAnimation.Play();
GameObject clone;
Vector2 mousePos = Input.mousePosition;
GunBlazeAnimator.SetTrigger ("GunBlazeAnimation");
shotgunSource.Play ();
clone = (GameObject)Instantiate (bulletPrefab, GunBlazeGameObject.transform.position, GunBlazeGameObject.transform.rotation);
clone.transform.rigidbody2D.AddForce(mousePos * 10.0f);
↧