Answer the question
In order to leave comments, you need to log in
How to find the previous position of an object?
I need to play animation if the object is in motion. But for this you need to compare the old and new positions, how can I determine the old position in the code, what should I write?
if (player.transform.position == "предыдущая позиция")
{
anim.SetBool("Walk", true);
}
else
{
anim.SetBool("Walk", false);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question