So I'm very new to unity. Just getting my feet wet and enjoying every minute of it. In my current project I'm making a simple battleship that has 2 turrets. I have a very simply script that uses transform.LookAt(target) to aim the cannons at an object. All works 99%. The issue I'm having is the "front" of my turret (or boat even) is 90 degrees off. So the side of the turret faces the target as opposed to the barrels. Any ideas to help me out?
Rotate the model in your 3D app so it works correctly in Unity; there's no standard orientation between different programs. --Eric
That was the first thing i tried. It seemed like it would be easy and not an issue. For some strange reason if I change the orientation of the turrets/boat in maya. it has no effect in unity.
You need to change the orientation of the mesh's 'pivot' rather than just rotating the whole mesh - i.e. the local coordinate system for the mesh needs to change.
Any more help on this? I feel like I'm doing what I should be. but I'm not getting the results I want.
I'm having similar issues as this guy. http://answers.unity3d.com/questions/39082/how-to-model-to-avoid-orientation-problems.html I know my main issue is I made my model facing the wrong direction. However, it seems its not as simple as rotating it in maya. I know I'm in the scripting section. So this is probably the wrong place for this question.
Solved. What was frustrating me the most is whenever I rotated the object in maya the rotation was exported along with it. So in the Inspector in Unity would also reflect that rotation (ie: -90* on the y axes). So the solution was simply freeze the transformations. Modify > Freeze Transformations
S O L V E - use own Unity pivot system "Hinge Joint", it is not based on exported pivots of Max or etc