Wednesday, 27 November 2013

Animation IDE

1) Free open source animation tutorial.
     http://www.blender.org/
     Create a game for level for unity.
     http://www.youtube.com/watch?v=mbm9lPB5GPw

Tuesday, 26 November 2013

Monday, 25 November 2013

Computer Graphics

All algorithms with animation.
http://www.netgraphics.sk/

Basic tutorial for Unity android game development.

1)Back key event

function Update(){

    if ( Application.platform == RuntimePlatform.Android ){
     
     if (Input.GetKey(KeyCode.Escape)){
      Application.Quit();
     }
    }
 
}
2) Object touch event
function Update () {
 TapSelected();
}
function TapSelected() {
  
 for ( var touch : Touch in Input.touches) {

   if (touch.phase == TouchPhase.Began) {
    var ray : Ray = Camera.main.ScreenPointToRay(touch.position);
    var hit : RaycastHit;
    if (Physics.Raycast(ray, hit)) {
    print("selected");
           
      
      hit.transform.SendMessage("Selected");
    }else{
     print("unselected");
    }
   }
 }
}
3) LookAtCamera.js
.js
var whoToLookAt : Transform;
var smoothTime : float = 0.3;
private var yVelocity = 0.0;
var distanceAbove: float = 0.4;
var distanceAway = -1;

function LateUpdate( ) {
    /* transform the camera so it is a distance away from target */
   transform.position = whoToLookAt.position + Vector3(0, distanceAbove, distanceAway);

    /* Look at the target */
    //transform.LookAt( whoToLookAt );
}  /* LateUpdate */