I made a airplane model out out simple unity shapes (cube, cylinder, etc…) and i attached both standard asset scripts “Aeroplane Controller” and “Aeroplane AI Control”. I gave the AI script a target and it flies toward it, but it’s like the x,y,z axis are wrong and the plane flies all wonky and sideways.
I’ve tried over and over to reconfigure the x,y,z axis on my 3d plane model to make it fly properly but it’s never right and always flies wonky sideways every time. The directions that come with the scripts are very vague and make it seem like all you have to do is attach the two scripts to your model and you’re good to go but that’s a got damn lie.
I attached the two scripts to the airplane prefab that comes with the standard asset package and it works fine. But I want to know how I can get it to do the same on my own airplane prefab? Has anyone run into the same problem with this? Is there a simple fix I’m overlooking? Any help at all is very much appreciated!
Well, you might get it working by now but for those who are following this question. I faced the similar issues with Unity airplane controller in standard assets, but then i found a guide document which states:-
- Start with a suitable scene. There ought to be enough flat ground for a sensible take-off.
- Place your 3d model in the scene.
- Add the AeroplaneController script. (this will automatically add a required Rigidbody component).
- Add the AeroplaneUserControl script.
- Add a suitable Collider (or set of Colliders), so that it doesn’t fall through the floor.
- Hit play, try taking off. (Arrows/WSAD for power and rudder, Mouse for roll and pitch).
- You may find the friction of your Colliders against the ground prevent take-off, or cause the plane to turn awkwardly during take-off. In this case you’ll either need to reduce the friction of the Colliders touching the ground (by assigning a low-friction physics material to the Colliders), or add Wheel Colliders to your plane so that it can roll along the ground before take-off (as we have done in the sample prefabs provided).
I hope this would be helpfull. @loganhoelscher123