I’m Steven and i just started with Unity. Actually i was doing that Space Shooter Tutorial wich went generally fine (except for those script Errors you get because the Video seems outdated).
Anyways i was at the part when you make the Laserbolt automatically move to the top of the screen. It works basically but unlike shown in the Video my bolt is moving slowly like it was lagging. So i enabled my Playermodel to check if it was my machine who was lagging. Nope the Ship just moves around the Area fine with the bolt lagging around it’s way.
So here my script text:
using UnityEngine;
using System.Collections;
public class Mover : MonoBehaviour
{
public float speed;
void Start ()
{
GetComponent<Rigidbody>().velocity = transform.forward * speed;
}
}
It’s almost identical with the Video’s except for the GetComponent Part wich Unity “Auto-Upgrades” because
rigidbody.velocity seems to be outdated or something.
any suggestions here? i really can’t figure it out by myself.
edit: Oh yeah the Speed Value is set to 20 just like in the video.
speaking to the “outdated” thing… unity 5 which was released recently did away with the majority of the “helper” references which let you use “rigidbody”, “transform” etc. without explicitly doing the component lookup first. More details and reasons in the unity blog linked below.
of and when you paste in code, please use the [ code] [ /code] tags (without spaces) so the code is formatted correctly
ok, copied that code onto an object in a test scene and it zipped off… so it doesn’t look like the script. Can you screen shot the inspector for the bolt?
Oh thanks for the hint with the Code thingy. Didnt know that. Does that Blog help me with my Problem tho? As said im kinda very new to that kind of Stuff. I have abslutely no experience and just the Childhood dream of making Games so i really have to approach this stuff slowly.
sorry, got sidetracked… that blog is mostly FYI to help you understand why tutorials and scripts from before 4.6 stop working or need to look slightly different in the current version.
Can’t see anything wrong with the screenshots either glad you got it working though.
Another Problem occured. On the Video counting points and displaying scores he is using something GUI Text wich doesnt seem to show up on Unity 5. However, on the Roll a Ball Tutorial game you also count scores and there we used the UI Text wich creates the Canvas and so on. I dont know if i should just use this since he seems to put the Text as a Child for the Player Object. And the UI Text is set into the Canvas… Having those outdatd Tutorials really makes stuff hard for people with no experience at all
GUI Text is the old system. Go with the new UI Text version.
you’ve started just as they did a fairly major overhaul of things they’re republished some of the tutorials (like the Roll a Ball) but it’s a big job to rebuild all the projects and redo all the vids etc. hopefully they’ll get to them all eventually.
Yeah i understand how much work remaking those vids would cause. Well… i got a good timing i guess… I prefer to have some Issues now rather than learning the old Version just before the new one comes out . I’ll try to figure out how to script it with the new UI System then. Should be kind of similar to the Roll a Ball thing. If i wont be able to do it i’ll just bother you since you seem to be the only one with me here so far
Edit: I hope my english isn’t too bad tho. As you might have noticed on the Screenshots my native Language isn’t English. Trying my best to make stuff understandable .
no worries, if anything the new UI system is a much more straightforward “build in the scene” kind of thing… can get more complicated when you have to wrap your brain around the Events engine which makes it work, but that’s only if you want to do something programmatically or fancy
There is a whole bunch of new vids in the learn section on the new UI
and there were a couple of unity live training sessions on it which will be on youtube somewhere (Unity channel unsurprisingly, they do live training on something once a week or so).
other’s will chip in, but I’ve noticed it’s fairly common for some threads to turn into conversations between a handful of interested parties your english (so far :P) has been perfectly fine
Yeah i’ve noticed that there is so much more stuff to look at. Wich is so overwhelming that i try to not touch that for now. I thought it would be a good thing to just to the Tutorial Projects for now even tho i’m not sure if i effectively learn anything by doing stuff exactly how i was told to. For me, the most confusing part always is the scripting part.
I kinda can understand the logic behind the Code i’ve been writing but sometimes i’m just like wtf… Not sure if it’s a good idea to just do the Tutorial Projects as the very first thing to do in order to learn Unity. But it looks way less dry than reading all those Documentations or the lesson videos because you always have your own Project as example.
And thus it’s kinda learning by doing i think. Those other Videos show examples too of course but they’re not touchable for me since theyr not on my Computer and not my Projects.
I just hope after completing all the Tutorial Projects i kinda understand and know what to do to make something on my own. Like a Roll a Ball game without having to watch the Video. That would be quite rewarding for me.
I’m glad that my english seems to be good And i’m even more glad that i’ve been lucky to have such an active Forum User on my side so fast. This Place is like really huge so i was kinda lost and did never expect anyone to actually care about my tiny Problems with a Tutorial Project at all because i think there are so many people trying to learn Unity and even more People who already worked with a whole while now and have whole other Dimensions of Problems wich makes it even more statisfying for me to have some actual person i can call on.
phew… Whole bunch of Text here… Sry for the long Post.
Jesus… I had some Problem again xD Tutorial is using a public variable for the score Text GUIText. Wich is basically still working in unity 5 but not with the canvas text as it seems… Had to do some Googleing to find out i need to use
using UnityEngine.UI
and the just change GUIText to Text…
Man i thought i screwed up when because of using the GUIText Unity stopped the whole script and my Asteroids stopped spawning at all…
Aaaaaaand it’s done! If i show this to my Friends i bet they be like Meh… Doesnt matter tho! I know how much work that simple shitty Game needed to run. And even tho it’s made with a Tutorial Video Step by Step… It’s still my work And Compared to the Roll a Ball Game this is a whole new Level of Game