Hey guys, I need to move an object to the left when a button is clicked, changing the scene when it goes past a certain point. I want it to move steadily in a direction though instead of teleporting like it is now. Currently when I push the button my 2D player sprite just moves a few units to the right
void OnMouseDown(){
Debug.Log("Pushed");
if(currMenu == menuState.title)
{
currMenu = menuState.weapon;
}
else if(currMenu == menuState.weapon){
objToMove.rigidbody2D.AddForce(Vector3.right * 3000);
if (objToMove.transform.position.x > 15){
Application.LoadLevel("Level1");
}
}
}