How do I rotate the propellers on this drone?

Hello! I’m creating a game where the player can fly a drone around. I made an empty game object called “Drone” and placed all of the pieces together to make a body with wings and feet, and then made all the pieces children of the empty game object. I did some scripting and now I am able to move the drone in all directions and fly around.

[24600-screen+shot+2014-04-01+at+10.02.48+pm.png|24600]

So, here’s where I’m running into an issue; I made a bunch of small propeller objects and I’d like to attach them to the wings so that when the player presses the spacebar to move up, the propellers spin (separately from the rest of the drone). I made the propellers and made them children of the empty Drone object, and added a script (only to the propeller “children”) so they would rotate when the spacebar was pressed.

When I do this, however, it doesn’t really work. It sort of made the entire drone rotate. This isn’t what I want at all. Can anyone help me out? I’ve been trying to use joints but they just make the propellers fall off the drone or make the drone get stuck in the ground.

You need another game object to be the propeller’s holder. It needs to be positioned correctly and then the propeller is a child of it at local position 0,0,0. You can now rotate the propeller around it’s local y axis to make it spin.

I wouldn’t bother with a joint to make it break off, unless you really want a particular force level to make that happen. If you want the propeller to break due to some impact then give it a rigidbody set to isKinematic = true. When it collides with something you set the parent of the propeller to null and set isKinematic = false - perhaps providing it with some force based on it’s current rotation (set its angular velocity to its spin rate and its velocity to the velocity of the drone).