transform shooting forward

i have on my FPS transform.forward * 10000(the speed) but when i fire its always firing forward not up if im aiming up it just goes forward not up were im pointing.... please help :O

To actually get a location of where to shoot you don't just give it the "forward" Vector.

Forward is always the same value. Increment along the x axis I believe, up being the Y axes and so on.

What you need is to extract the current location of what you "target" , assuming mouse by registering a position in 3D space (I assume) with for example Raycasting.

When you fire you register the input, that event triggers a script based measurement of the location. The location information is store in a Vector3 object. That information is now ready for use in determining the position between source and destination.

Source being point A and destination being point B you could do a Linear Interpolation (LERP) , or use Trigonometry to determine the forces required to get the correct angle. I am sure Unity has 89267892 functions for this of which I know zero. I usually just work with math, being all new to Unity and so. So please do look before doing that part yourself. The LERP function is part of the Mathf library I do know for a fact.

Well hope this gets the theory part covered for you. Sorry for not supplying a readily availabe answer but I don't have the time investement available for it now.

Good luck :)

Hmm... dont know if it helpes but try:

bullet.rigidbody.AddForce(transform.forward * 10000);

At bullet type what ever your "bulletPrefab" is called, and your bullet needs a rigidbody.

Hope that helped:)