
Unity
- 2 ответа
- 0 вопросов
1
Вклад в тег
RigidBody rb
void Start():
rb = get component<RighidBody>
public void тут твой метод():
if туда куда тебе нужно > posintion.x, position.y:
rb.velocity = newVector2(posintion.x, position.y - туда куда тебе нужно)
else:
rb.velocity = newVector2(posintion.x, position.y + туда куда тебе нужно)