Answer the question
In order to leave comments, you need to log in
How to make an object move in Unity?
How to make an object, namely a sphere, move in a given direction after clicking? I want to do something like in that game about balls (as in the picture).
The only thing I found to resolve the issue is that you can use Rigidbody2d.AddForce() , but I don't understand how to use it.
Answer the question
In order to leave comments, you need to log in
0. add script components (control program), some hitbox (for example, spherical) and rigidbody (physics control element) to the required
body , fix the axes of rotation / movement of the body and something else on the little things.
2. If you need a "hit on click", then create an onClick method in the script and insert a call to Rigidbody2d.AddForce();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question