@DANICH70
Разбираюсь в Unity 2D/3D

Ошибка: transform.position assign attempt for «....» Input position is { Infinity, Infinity, Infinity }?

В коде возникла ошибка, transform.position assign attempt for "...." Input position is { Infinity, Infinity, Infinity }. Подскажите, что не так?
код:
using UnityEngine;
using System.Collections;
public class NewBehaviour : MonoBehaviour
{
    public GameObject player;
    public float speedRotation = 1;
    public float speed = 1;
    public float jumpSpeed = 1;
    float totalTime = 0;
    void Start()
    {
        player = (GameObject)this.gameObject;
    }
    void Update()
    {

        {
             player.transform.position += (-player.transform.right) * speed * Time.deltaTime;
        }

        totalTime += Time.deltaTime;
        if (totalTime > 5)
            speed *= 10;
    }
}
  • Вопрос задан
  • 174 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы