Is it a Bug in unity?

Hi guys,

I am working on a code for 3 weeks,but i did not get the result.i thinks this is a bug in unity.i reported it to bugs@unity3d.com but did not get any answer.if you can please help me.

i want fire a bullet from a mouse position,and the bullet goes straight.there is not any problem until this point but when i want fire in corners of screen the bullet does not go straight and goes out of screen.when my bullet have gravity i have this problem,but without gravity i do not have this problem.i got a video for you to get what i say exactly.please refer to link.

http://www.multiupload.com/LAZUICU9G2

so thanks.

It appears from the video that the only difference between the behaviour in the two firing positions is the fact that the camera is on an angle, so the bullet seems to fall sideways. It is not obvious because the background is a single color, so it provides no point of reference.

Edit: To clarify, there does not appear to be a bug at all (neither in Unity nor in your code) -- it just looks like it because the camera is tilted.

I was clear you Firebullet.cs Update code:

 void Update () {
        if (Input.GetKeyDown(KeyCode.Return))
        {
        Vector3 ms = camera.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 100));
            GameObject myMissile = Instantiate(misslePrefab, transform.position, Quaternion.identity) as GameObject;
            myMissile.transform.LookAt(ms);

            myMissile.rigidbody.rotation = myMissile.rigidbody.rotation;
            myMissile.rigidbody.velocity = myMissile.transform.forward * 100;// rDirection;

            //destory the missle after two seconds
            Destroy(myMissile, 2);
        }
    }

I can only add to the others who have gone before me, but there are two things to can do to clarify your problem. First: Add a background of some sort so you can see the bullet in relation to the surroundings - things can get confusing otherwise. Second: Check to see if your camera is rotated, and if it is, that's likely your problem. Hope this helped!

dear milad it's not a problem. gravity effect things in a way that you might don't like. real bullets have high velocities and gravity's effect on them is different on them due to their special characteristics. physx is a general physics engine and for cases like yours you need to do one of the things below 1 make the gravity value smaller 2 make the speed of your bullet much higher (recommended) 3 disable the physics and calculate bullet's movement with it's own formulas yourself. also you should scale things in a correct manner. i mean: your bullet should not be 1 meter. i can answer better than others because i know what you are working on.

I believe your camera's FOV is too wide, like 70+. Try adjusting your screen size/resolution and your FOV.