Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
688 B
12
Indexable
Never
if (transform.position.x > -5.5f)
        if (transform.rotation.z == 0)
        transform.Translate (0, -0.1f, 0);
        
        if (transform.position.x > -5.5f)
        if (transform.rotation.z == 90)
        transform.Translate (0.1f, 0, 0);
         
        if (transform.position.x > -5.5f)
        if (transform.rotation.z == 180)
        transform.Translate (0, 0.1f, 0);
         
        if (transform.position.x > -5.5f)
        if (transform.rotation.z == -90)
        transform.Translate (-0.1f, 0, 0);

        if (Input.GetKeyDown(KeyCode.X)) {
            if (Rotating == true) {
                transform.Rotate (0, 0, 90);
            }
        }
Leave a Comment