# how do I instantiate something with only the y axis rotation matching the instanciators y rotation

i'm making a swimming mechanic for my game and i need to instantiate the swim camera under neath the fps player when it hist the water. no mater what I try the swim cam wont have the same y rotation as the fps when its instantiated, and vice versa. what am i doing wrong? here is the scriptInstantiate(swim, new Vector3(transform.position.x, transform.position.y -2, transform.position.z), rotation: transform.rotation=Quaternion.AngleAxis(0,0,0));

• It could be because transform.rotation=Quaternion.AngleAxis(0,0,0) will assign a value to transform.rotation – Jay Feb 13 '19 at 2:55
• i ment to add transform.rotation=Quaternion.AngleAxis(0,tTransform.rotation.y,0);sorry. it keeps throwing an error – Indiepixel Feb 13 '19 at 22:42
• Why do you sometimes use transform and sometimes tTransform? – Jay Feb 14 '19 at 0:28
• ah, just a mispelling, im a little jittery is all – Indiepixel Feb 14 '19 at 23:07