[JS]Bullets going to the right side.

Hello,

I have a little problem with my game.
My bullets are going to the right and not stright forward?

My bullet code:

#pragma strict

var SpeedBullet : float = 500;

function Start () {
	rigidbody.AddForce(transform.forward * SpeedBullet);
}

My first spawn bullet code:

function FireOneBullet () {
	Instantiate(Bullet, FirePoint.transform.position, transform.rotation);
	Ammo--;
}

Place your bullet in an empty gameobject and turn the bullet in the correct direction.

Make sure that your Fire point is facing forward (Z Axis).

A quick and easy fix would be to not change the actual object, and change the transform.forward to -transform.right

Thx it works but i have an other problem if i am shooting my capsule is vertical and it needs to be horizontal?

then you should probably go with what fluzing said, and go back to the transform.forward, and apply the script to the empty and not the bullet