Want to watch this Lesson?
Start a free 7-day trial today. It's quick - and you can cancel anytime.
Watch course trailer Get StartedMovement of the ship will be kept simple with an automatic propulsion upward with only horizontal movements being controlled by the player.
Login with your CG Cookie Citizen Account to ask a question.
Get Started-
p
Error when attaching script to Rocket
1 answer · asked
Error when attaching script to Rocket
"Can't add script behavior AssemblyInfo.cs The script needs to derive from MonoBehavior!"
I don't know what any of that means. In the lesson, it looked a click-and-drag.
1 Answer -
p
Visual Code Studio is a free download
1 answer · asked
Visual Code Studio is a free download
In case anyone else is wondering, Visual Studio Code is a free download for all major OSs.
https://visualstudio.microsoft.com/downloads/You can probably use any other text editor if you prefer.
1 Answer -
n
Rotating Everything Around 180 Degrees
1 answer · asked
Rotating Everything Around 180 Degrees
So you mentioned in a comment in Planets, Supply Station and Text Messages that we need to rotate everything by 180 degrees such that +X is on the right side. This video is the first one I see with +X on the right side, so I gave this a try.
The Environment seems straightforward (rotate 180 on Y), as is readjusting the Main Camera and Directional Light positions. I also rotated the Skybox by 180 in the Sky material's settings.
The Rocket doesn't seem as straightforward. If I rotate it 180 on Y, then the script has to also be adjusted:
rigid.rotation = Quaternion.Euler(0, 180, Input.GetAxis("Horizontal") * -tilt);
But now the ship's tilt is reversed, so I also have to remove the negative in tilt:
rigid.rotation = Quaternion.Euler(0, 180, Input.GetAxis("Horizontal") * tilt);
How did you get the ship to face the right direction in the video, where the Transform component shows (0, 0, 0) for the rotation?
EDIT: OK, this comment thread helped. I did try rotating the child meshes before, but the part I missed was making the window a child of the fuselage, rotating the fuselage, and then unparenting afterwards. So no changes in the script are necessary now, and the Rocket can have a rotation of (0, 0, 0).
1 Answer -
h
What I'm I doing wrong?
1 answer · asked
-
I am getting an error when attempting to add the script.
2 answers · asked
I am getting an error when attempting to add the script.
"Can't add script component 'Rocketship' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match." I have attached an image of my code.
2 Answers