Vector3.right vs Transform.right

void Update () 
    {
	    if (Input.GetKeyDown(KeyCode.P))
	    {
	        isForce = true;
	        print("i have "+(isForce?"yes":"No")+" Force ");
//	        transform.position = transform.right * 3;
	    }

        //Pratice the transform.right with AddForce
//	    if (Input.GetButtonDown(XaxisName))
//	    {
//	        
//	    }
        //Transform.right is move along with the red axis of the transform.
//        rigidbody.AddForce(transform.right * MoveSpeed * Input.GetAxis(XaxisName));

        //Vector3.right is move along with red axis of the world space.
        rigidbody.AddForce(Vector3.right * MoveSpeed * Input.GetAxis(XaxisName));
	}

  

posted @ 2014-07-09 16:17  penney  阅读(537)  评论(0)    收藏  举报