- Home /
Question by
jaytheray97 · Oct 17, 2013 at 05:21 AM ·
c#transform.rotationpingpongxaxis
Scripting a object to rotate to the sides on the x cordinate
Hi I am having some difficulty figuring out how to set this up. I was using translate.rotation to write these first code examples.
transform.Rotate(Mathf.PingPong(Time.time, 3), 0.0f,0.0f);
After I wrote that I tired a few different setups having but when i get the object to rotate off the other base object it goes a full 360 without stopping.(sparing bag for a gym setup)
transform.Rotate(90.0f * Time.deltaTime 0.0f, 0.0f );
Any thoughts on how I can fix the full 360 rotation to where it rotates a selected amount on the x.
Comment