Interactivity : Workshop 4

/
0 Comments
This lesson included making the spaceship move in the game. 


We began the lesson by adding  a C# script to allow the spaceship to appropriately rotate in direction when making it go left and right to give it a more realistic turning movement.  We also created a boundary for the ship which meant it would not go off screen during the game, so the player can always keep track of whereabouts the ship is. 



Next we wanted to add a bolt to the scene to shoot the asteroids with. We added a cube to a quad and then selected the bolt material to apply to this. A rigidbody and capsule collider were also added by going to Add Component > Physics > Rigidbody and Add Component > Physics > Capsule Collider respectively.  The rigibody was created to  work with the coding while the capsule collider was created closely around the bolt to prevent any unwanted background becoming visible. 




With this attached to the object, in the inspector under Shader we changed the option to Particle/ Additive. This meant that the black background of the material would be gone, leaving only the bolt light visible. 


Final bolt in assets folder after being applied 



You may also like

No comments: