Answer the question
In order to leave comments, you need to log in
How can I use a script to move an object in Unity by a certain distance, for example by "1" with input.GetKeyDown?
there is a function:
if (input.GetKeyDown(KeyCode.A))
{
//плавно передвинуть объект (translate) на 1 по оси z влево
}
else if (input.GetKeyDown(KeyCode.D))
{
//плавно передвинуть объект (translate) на 1 по оси z вправо
}
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