Unity Flight Simulation Tutorial

Posted on: March 6th, 2013 by tdc_user
This Unity Flight Simulation tutorial demonstrates how to make a model fly using a simple, customized script. Scroll down for the Flying-Tank3.js script, as well as step-by-step instructions, and controls. It needs to be mentioned that the independent developer version of the Unity game engine is free, and can be downloaded at www.unity3d.com. If you want to see the video tutorials for modeling, xforming, unwrapping, texturing, and exporting the flying vehicle from 3ds Max, go to the 3dcognition Facebook page.
Flying-Tank3.js Process to export the 3ds Max model: 1. Create the model with units set to unitless/default. 2. Make the model within a size that is approximately 200 x 200 x 200. 3. Assume an orientation such that top, front, and right are aligned with the 3ds Max top, front, and right. 4. Once the model is complete, flip it -90 degrees around the x axis. 5. Go to “tools” and apply an xform modifier to the model. This will reset the orientation to be as if you created in this new orientation. 6. Go ahead and apply an unwrap modifier and apply a material if you wish at this point, or just apply a uvw map and a standard material. 7. Select the model, and choose File > Export Selected > and choose filetype of FBX. 8. Turn off all features you don’t need, like animation, etc. Process to import the 3ds Max model and texture: 1. Make sure the model and texture are in the Assets folder of whatever Project you are working on. 2. Drag the model into your Hierarchy panel. 3. Select the model in the Hierarchy panel and change the Transform rotation to be 0 0 0. 4. Apply a Rigidbody to the model. Make sure the Rigidbody Mass is set to 1, Drag is set to 0.5, Angular Drag is set to 0.05, Gravity is checked, Kinematic is not checked, Interpolate is set to none, Collision Detection is discrete, and Constraints are all unchecked. 5. Apply a Mesh Collider to the model, and make sure that Is Trigger is unchecked, Convex is checked (so it will collide with other objects), Smooth Sphere Collision is unchecked, and Mesh should already be set to the same value as your model. 6. Drag and drop the Flying-Tank3.js script onto the model in the Hierarchy panel. 7. Setup a Main Camera – move a camera so it is behind and above the model, looking slightly down upon the model. Now drag the camera to the model, so it becomes a child of the model. 8. You should be good now to hit the Play button and test out your flight simulator! Controls: Left and right arrow keys: Yaw Up and down arrow keys: Pitch z and x: Roll a and q: Slow thrust, Fast thrust Tags: , , , ,

Comments are closed.