RigidBody is replaced in Unity5 with GetComponent ()
A sample code below -
private Vector3 input;
void Update() {
input = new Vector3 (Input.GetAxis("Horizontal"),0, Input.GetAxis("Vertical") );
GetComponent ().AddForce (input * moveSpeed);
}
nvoids.in
blog.nvoids.in
A sample code below -
private Vector3 input;
void Update() {
input = new Vector3 (Input.GetAxis("Horizontal"),0, Input.GetAxis("Vertical") );
GetComponent
}
nvoids.in
blog.nvoids.in
No comments:
Post a Comment