- Home /
Question by
Seventh Stealth · Mar 09, 2015 at 09:09 PM ·
javascriptbullet
Bullet isn't moving forward
var weapon : Transform;
var tranq : GameObject;
var bullet : GameObject;
var Speed : int = 5000;
var fwd;
function Start(){
fwd = transform.TransformDirection(Vector3.forward);
}
function Update () {
transform.position = weapon.TransformPoint(Vector3.zero);
transform.forward = weapon.TransformDirection(Vector3.forward);
}
function ShootTranq(){
var tranqClone = Instantiate(tranq, transform.position, transform.rotation);
tranqClone.rigidbody.AddRelativeForce(fwd * Speed , ForceMode.Impulse);
}
The bullet gets instantiated but it never moves? How do I fix this?
Comment
Best Answer
Answer by Seventh Stealth · Mar 10, 2015 at 04:13 PM
Fixed it. Switched some settings on the rigidbody. IsKinematic and gravity
Your answer
![](https://koobas.hobune.stream/wayback/20220613185628im_/https://answers.unity.com/themes/thub/images/avi.jpg)