Not sure if it has anything to do with updates in the Unity engine, but I didnt' have to do the extra code to inhereit only the forward velocity. It works as yours did after you added the extra code. version 2022.3.41f
It's good, however in the original Asteroide game, the asteroides are coming from every sides in every directions, not just from the left to diagonal right.
Question bout wrapping. What should I do if my ship is standing still? I am for real. After putting wrap.cs on gameobject it stopped moving UPD: I have no clue how but I solved problem. I just copied code from github and runned game, hoping it would work. Worked. Now I am comparing 2 listings and thinking what went wrong
I have get 1 error while using this line on Player.cs script " GameManager gameManager = FindAnyObjectByType();". The error shows that "Assets\Scripts\Player.cs(97,39): error CS0103: The name 'FindAnyObjectByType' does not exist in the current context" in the debug window. Give me a solution
That should work fine if your player script is correctly inheriting from monobehaviour in the definition line. public class Player : MonoBehaviour If not you can always try to call it directly as GameObject.FindAnyObjectByType
We want more videos like this. You are a good programmer. It is very nice of you to share the codes with us. Thanks for everything man.
This is the best begginer friendly Unity/C# tutorial on UA-cam. Thank you!
underrated tutorial actually very useful
Amazing how have you not got more subscribers? I've been Unity for years as a hobby and I still learned a thing or two!
Not sure if it has anything to do with updates in the Unity engine, but I didnt' have to do the extra code to inhereit only the forward velocity. It works as yours did after you added the extra code. version 2022.3.41f
It's good, however in the original Asteroide game, the asteroides are coming from every sides in every directions, not just from the left to diagonal right.
Fantastic and so well explained! Thank you.
nice, I'm trying to make an Asteroids based game, so any further Asteroids tutorials would be of great interest to me, cheers
Really good tutorial
I wish I could add that accelerator effect to my spaceship but I'm too dumb to be able to do that. :D
How to add a working score script?
Question bout wrapping. What should I do if my ship is standing still? I am for real. After putting wrap.cs on gameobject it stopped moving
UPD: I have no clue how but I solved problem. I just copied code from github and runned game, hoping it would work. Worked. Now I am comparing 2 listings and thinking what went wrong
I got an error saying that Rigidbody2D could not be found
I have get 1 error while using this line on Player.cs script " GameManager gameManager = FindAnyObjectByType();". The error shows that "Assets\Scripts\Player.cs(97,39): error CS0103: The name 'FindAnyObjectByType' does not exist in the current context" in the debug window. Give me a solution
That should work fine if your player script is correctly inheriting from monobehaviour in the definition line.
public class Player : MonoBehaviour
If not you can always try to call it directly as GameObject.FindAnyObjectByType