AddForce doesn't use local axis

Hi! I have problem with applying force to instantiated bullet. Vector3.something make my object move by world axis instead of local. I also tried applying force/velocity in separate script.

Transform bullet= Instantiate(bulletPrefab,SpawnPoint.position,SpawnPoint.rotation) as Transform;
bullet.rigidbody.velocity=Vector3.forward*100;

or

bullet.rigidbody.AddForce(Vector3.forward*100);

both give same result - bullet move along the world axis instead of local. I wonder what could be wrong because code in script reference is the same. Should this be in FixedUpdate?

You might take a look at the transform.Translate function.

As for the Update vs FixedUpdate, it’s my understanding that most if not all physics actions should be placed in FixedUpdate. You can remove the need for fixed update by multiplying your values by Time.deltaTime, but fixed update is a known quantity that is less prone to fluctuations.

Ty for answer. I’ve found the solution in some other question.

bullet.rigidbody.AddRelativeForce(0, 2000, 0);

transform.Translate worked but speed wasn’t reallistic. It also make bullet fly away in strange ways if they hit something.