The last step is to allow the user to move the chair after they select it. Fortunately, we can do all that in code. Open up your code editor to the SceneController.cs file and follow along:
- Add a new public variable to the top of the class after the line identified:
public GameObject m_andyAndroidPrefab; //after mepublic float MoveSpeed = .1f;
- This new float MoveSpeed sets the speed at which the user can move an object. You can also think of it as the move sensitivity. We set it to the default value of .1f here, but feel free to change it in the Inspector later when testing.
- Locate the following highlighted section of code and replace it with this:
if (Input.touchCount < 1 || (touch = Input.GetTouch(0)).phase != ...