- Home /
Imported model is rotated 90 degrees off of straight, can't use any transforms
I can't figure out what to do, I want to have my ship rotate to sides and have a relative force applied to it, but because it was imported wrong I can't use anything. It's all backwards, the ship has to be at a -90 degree x value to be going straight so using any forces causes them to be applied wrong. Here's what I currently have for code, what I'm trying to do is rotate left/right and use shift to head in that direction.
function Update () {
if (Input.GetKey (KeyCode.UpArrow)){
rigidbody.AddForce (Vector3.up * 16);
}
if (Input.GetKey (KeyCode.DownArrow)){
rigidbody.AddForce (Vector3.down * 16);
}
if (Input.GetKey (KeyCode.LeftArrow)){
transform.Rotate(Vector3.left);
}
if (Input.GetKey (KeyCode.RightArrow)){
rigidbody.AddForce (Vector3.right * 16);
}
if (Input.GetKey (KeyCode.LeftShift)){
transform.Translate(Vector3.forward * Time.deltaTime);
}
}
Comment
Answer by Spincu · Jul 23, 2013 at 04:57 PM
just put the pieces of your model into empty objects from unity and work on those :)