CopyPastehas never been so tasty!

move by eitiel

by anonymous

  • 0
  • 0
  • 0
129 views

var speed = 10;


function Update()
{
if(Input.GetKey("left"))
{
rigidbody.AddForce(Vector3.left*speed);
}


if(Input.GetKey("right"))
{
rigidbody.AddForce(Vector3.right*speed);
}
if (Input.GetKey("up"))
{
rigidbody.AddForce(Vector3(0,0,1)*speed);
}

if (Input.GetKey("down"))
{
rigidbody.AddForce(Vector3(0,0,-1)*speed);
}


Add A Comment: