Tank shoot not working in one direction alone?

I created a tank game and the tank shoots. The shooting process works fine but when i turn the tank to left direction the ball just falls down the force is not applied.

Instantiate(bullet,spawnPoint.position,spawnPoint.localRotation); rigidbody.AddForce(GameServer.gameServer.ray.direction * GameServer.gameServer.bulletSpeed);

i used this…also tried Quaternion.identity instead of spawnPoint.localRotation that doesn’t work too…

I bet you’re not applying a force in local space, which means that when you turn, it instantly hits the tank’s collider.

use transform.TransformDirection.

Fixed it…i used a spawn point for shooting and the spawn point had a sphere collider…when i removed it the problem is fixed…anyway thank u guys…