- Home /
Dart/Bullet comes out pointing up
I'm trying to make an FPS in Unity, but every time I shoot the dart, even thought it shoots forward, it faces upwards. Here's the code I'm using:
#pragma strict
var SpeedBullet : float = 750;
function Start ()
{
rigidbody.AddForce(transform.right * SpeedBullet);
}
Answer by sparkzbarca · May 20, 2013 at 01:01 AM
open the object in blender. Rotate so the object is properly oriented
In blender this normally means rotaing -90 degrees on the x axis and applying and saving the rotation.
DO NOT DO the addforce transform.right.
rotate and make it right so forward is forward.
Otherwise you'll deal with this problem endlessly.
Forward should be forward, you shouldnt hack around it, make it right.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
I need help with Javascript 2 Answers
FPS Run Animation Gun - Rotation Issue 0 Answers
Bullet not destroying on collision 1 Answer
How to add Bullet Velocity 1 Answer