I have a prefab that has a rotation of 90 degrees on it so it should be horizontal. If I instantiate this prefab using Quaternion.Identity it comes out vertical and isn’t keeping the rotation.
I’ve tried everything I can think of and google but these prefabs WILL NOT ROTATE and it’s driving me nuts.
Here’s my instantiation:
Instantiate(myWires[x], new Vector3((float)(ranges[x] - 1.40) + y, 18.5f, x * 20), myWires[0].transform.rotation);
Note I’ve changed it from Quaternion.Identity here in hopes it would stay at 90 degrees but nope. What gives? Why will these prefabs not rotate or keep their native rotation?
I never had a problem with rotation. However, identity rotation is (0,0,0). And this is what you got. About your code posted here. I cant help you since i dont know what myWires[x] is.
– LovrencAre you overriding / setting the rotation somewhere else? I had the same problem in the Angry Bots demo as the player rotation is reset in the movement controller.
– gfvfubbmyWires[x] is just a GameObject array that holds my wire prefabs.
– ultrasilence