Answer the question
In order to leave comments, you need to log in
How to make an object move with your finger?
How to make an object move
smoothly behind the finger only along the y axis? I watched a lot on the Internet, tried a lot of codes with alteration to suit my needs. But everything does not work out because I am a beginner and I am learning how to do it. With a computer, it’s clear how, but with the phone there are always difficulties. You need to somehow make the user hold his finger on the screen and move it up / down, moving the object accordingly.
So far, this is implemented like this only through the keyboard
void FixedUpdate () {
obj.transform.Translate(Vector2.left * speed * Time.deltaTime);
float yPoz = Input.GetAxis("Vertical");
Vector2 direction = new Vector2(-1,yPoz);
obj.transform.Translate(direction * speed * Time.deltaTime);
}
Answer the question
In order to leave comments, you need to log in
1 Take a leaflet
2 Go to https://nominatim.openstreetmap.org/ and pull the city polygons
3 Convert it to geojson
4 Insert the data on the map, open the info popup when hovering over the polygon
I don't think you've tried anything. You already ask 2 questions in an hour. Maybe you need to learn Unity along with C#. Ask stupid questions that take 3 times more time to explain to you
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question