Помогите с ошибкой

Программирование на Юнити.

Помогите с ошибкой

Сообщение Nurlan8 03 апр 2020, 11:11

В юнити недавно. Только начал изучать. Смотрю видео урок и в точности все повторяю, но вылезла ошибка. Все пересмотрел , все в точности как в видео уроке. Две ошибки:
Assets\Script\Player.cs(22,12): error CS1061: 'Rigidbody2D' does not contain a definition for 'velosity' and no accessible extension method 'velosity' accepting a first argument of type 'Rigidbody2D' could be found (are you missing a using directive or an assembly reference?)
Assets\Script\Player.cs(22,75): error CS1061: 'Rigidbody2D' does not contain a definition for 'velosity' and no accessible extension method 'velosity' accepting a first argument of type 'Rigidbody2D' could be found (are you missing a using directive or an assembly reference?)


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player : MonoBehaviour
{
Rigidbody2D rb;
public float speed;

// Start is called before the first frame update
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{

}
void FixedUpdate()
{
rb.velosity = new Vector2(Input.GetAxis("Horizontal") * speed, rb.velosity.y);
}
}
Nurlan8
UNец
 
Сообщения: 10
Зарегистрирован: 03 апр 2020, 11:04

Re: Помогите с ошибкой

Сообщение Alex5 03 апр 2020, 11:27

velocity
Linux это просто
Экономика это просто
Forex это просто
Мой канал на YouTube
Аватара пользователя
Alex5
Старожил
 
Сообщения: 507
Зарегистрирован: 22 авг 2019, 17:37

Re: Помогите с ошибкой

Сообщение Nurlan8 03 апр 2020, 12:17

Спасибо. Не заметил))))))
Nurlan8
UNец
 
Сообщения: 10
Зарегистрирован: 03 апр 2020, 11:04


Вернуться в Скрипты

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 11