A
A
Alexander2020-04-25 02:05:50
Unity
Alexander, 2020-04-25 02:05:50

How to drop an object with touch?

I'm making a game. I'm trying to make it possible to launch an object with a finger across the playing field, like in curling for example. The script doesn't work. (
I tried this code (but the Stone1 object is still standing still, the privatization of the game)
public class Stone : MonoBehavior {
public float speed;
private Vector2 Stone1;

public Regidboqy2D RenderBuffer { get; private set;}

private void Start()
{
RenderBuffer = Get Component();
}

void Update ()
{
Vector2 moveImput = new Vector2 (Input.GetAxRaw("Horizontal"), Input.GetAxRaw("Vertical"));
Stone1 = moveImput.normalized * speed;
}

}

When you click on an object, it increases in size and that's all(

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question