I got a “leg” that I want to move back and forth on the x axis. all I get is errors so this is what I have been using but many need something else. Thanks.
publicfloatmin=2f;
publicfloatmax=3f;
//Usethisforinitialization
voidStart () {
min=transform.rotation.x;
max=transform.rotation.x+3;
}
//Updateiscalledonceperframe
voidUpdate () {
transform.rotation =newVector3(Mathf.PingPong(Time.time*2,max-min)+min, transform.Rotate.x);
}
}