Answer the question
In order to leave comments, you need to log in
Managing GG with a wheelbarrow?
Task: to organize the management of the GG with a finger.
I was only able to do this:
if (Input.GetMouseButton(0))
{
Vector3 mousePosition = MainCamera.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, MainCamera.transform.position.y));
_rb.MovePosition(new Vector3(mousePosition.x, 0.0f, mousePosition.z));
}
Answer the question
In order to leave comments, you need to log in
You need to take the delta between the moment the screen is touched and the current position of the finger and add this delta to the current position of the character.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question