Search Unity

can somebody explain this in more detail

Discussion in 'Scripting' started by Ender, Nov 23, 2011.

  1. Ender

    Ender

    Joined:
    Jun 3, 2011
    Posts:
    72
    I'm trying to make a spaceship with different thrusters all over it which push it in different directions.

    Right now I'm using 1 rigidbody and 1 mesh..to make a ship that behaves in different ways using if statements and addrelativeforce and addrelativetorque.

    Can I/should I make different parts of the ship their own rigidbodies and parent them all together somehow? Or make 1 complex script for the 1 rigidbody that imitates what the ship would do if the thrusters fired?

    also, can somebody further explain what rigidbody.inertiaTensor does?

    http://unity3d.com/support/documentation/ScriptReference/Rigidbody-inertiaTensor.html
     
    Last edited: Nov 23, 2011
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    No, you should have one rigidbody for the object. You can have multiple children with their own scripts, but they should all affect the parent rigidbody (SendMessageUpwards being one possibility).

    --Eric
     
  3. justinlloyd

    justinlloyd

    Joined:
    Aug 5, 2010
    Posts:
    1,680