Forgive me, I am new to Unity and to javascript language. I have an issue that I am sure is easy to fix, but I don’t seem to understand how the Transform works.
Issue: I have a asset (fbx file) i have imported into my game. If I drag this item into the scene, it shows up the way I would like it to. Facing west to east on the X axis. When I look at the inspector for the object, it has the Y and Z axis set at 270.
I have dragged this into a prefab and added a rigidbody to it.
The problem is when I instantiate this prefab it sets the rotation to 0,0,0 and faces straight up on the y axis. When looking at the instantiate references i could not find what I am looking for. Obviously I need code to change the look of this object before it exists on the screen. Does the come from scripting, or do I need to try and fix this in Maya?
This is the result of hitting a GUI Texture button
var instance = Instantiate(shot, transform.position , transform.position) as GameObject;
Any help or documents that someone can point me to would be greatly appreciated.