void Start()
    {
        trans      = GetComponent <TransformSpherical>();
        nextAction = 0;
        solidType  = Solid.White;

        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible   = false;
    }
Exemplo n.º 2
0
    void OnPreRender()
    {
        TransformSpherical trans = GetComponent <TransformSpherical>();

        Shader.SetGlobalMatrix("_View", trans.worldToLocal.Matrix());

        Camera cam = Camera.main;

        // Note that z_far is negative!
        Shader.SetGlobalMatrix("_Projection", GL.GetGPUProjectionMatrix(Matrix4x4.Perspective(cam.fieldOfView, cam.aspect, 0.01f, -0.01f), false));
    }
Exemplo n.º 3
0
 void Start()
 {
     colls = new List <BallColliderSpherical>(GetComponents <BallColliderSpherical>());
     trans = GetComponent <TransformSpherical>();
 }