Is there a way to set the current rotation of an object to 0,0,0?

what i mean is, i have an object that when it is 0,0,0 it is at a real screwed up rotation and i want it to be rotated so that it lies horizontal (its a long object). so the rotation values when i can make it horizontal are all screwed up… x = 34.57777. y = 226.0514 z = 231.7793. this causes problems when i try to instantiate the object because it sets the rotation to 0,0,0 and it doesnt lie horizontal, so i was wondering if i could set the current rotation to equal 0,0,0 when the object lies horizontal?
this is my instantiate line if it helps

Instantiate(thePrefab, leftwallpos, transform.rotation);

No, you need to make that change in your 3D modeling application of choice. Rotate the object in it and Freeze it’s transforms. What this operation is called, varies from program to program though, that’s what it’s called in Maya.

Otherwise, look at what the rotation is that looks good for you, and use that rotation value when you instantiate.

edit: Of course, what “whydoidoit” describes is another option, as an empty game object won’t create much overhead, though it makes things a tad messier.

  1. Make an empty game object.
  2. Add the model as a child of it
  3. Rotate the model until it is correct
  4. Create a prefab out of the parent

Use the prefab instead of the model.