- Home /
Question by
SuperPurpleByte · Sep 14, 2014 at 04:22 AM ·
physicsnot workingrocket
Why wont this rigidbody move?
I have no idea why it isnt moving. I dont even get any errors.
using UnityEngine;
using System.Collections;
public class RocketPropulsion : MonoBehaviour {
public float speed; //meterspersecond
public float burnTime;//How long is the rocket have thrust for?
public float spinRate;//How many rotations per second
public float velocityAtLauncherExit;//how fast does it exit the launcher
public float accelerationInitial;
public float accelerationFinal;
public Rigidbody rocket;
//Technical data for the rocketMotor
void Fixedupdate(){
Rocket ();
}
// Use this for initialization
void Start ()
{
GetComponent<Rigidbody> ();
}
// Update is called once per frame
void Rocket ()
{
rigidbody.AddForce(rocket.transform.up * speed * Time.deltaTime);//fires the rocket at the defined speed going in meters per second.
}
}
Comment
Answer by SuperPurpleByte · Sep 14, 2014 at 12:47 PM
I found the problem. I forgot to capitalize the u in fixed update I wrote it like Fixedupdate should have been FixedUpdate. XD