I am currently trying to do the space shooter tutorial. Al was fine until the video “moving the player”. After I typed up the script exactly as said in the video it gave me this error:
Assets/Scripts/PlayerController.cs(12,13): error CS1061: Type UnityEngine.Component' does not contain a definition for velocity’ and no extension method velocity' of type UnityEngine.Component’ could be found. Are you missing an assembly reference?
Here is the code that was in the tutorial
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
Thanks so much! I was about to give up on the tutorial but now it works. I just have to make sure I use rBody instead of rigidbody. I am going to keep going through the tutorial and hopefully nothing else goes wrong. Thanks again!
No problem. I would suggest you download the upgrade guide for the tutorial as well. Its from version 4 and version 5 introduced some breaking changes. So you might run into some more trouble. They really should update that tutorial, doesn’t help people learning very much if some major things are broken.