• Twitter
  • Facebook
  • Google+
  • RSS Feed

Wednesday, 11 February 2015

Interactivity 4- Learning how to rotate the spaceship & making it shoot

No comments:
 
During our fourth lesson we were shown how to make our ship rotate using a piece of coding. We began the lesson by trying to write a piece of C# coding that allowed an object to float and move because the code adds force to the rigidbody resulting in the movement. 



We then make another script which did a few things. Firstly the code allowed the spaceship to not move out of a certain parameter through a 'xMin' and 'xMax' making sure it doesnt move further than a certain point. Secondly the code worked on getting the ship to rotate when the ship moves. This was done by a variable being added called 'Tilt'. 





 We then created a quad and added an object to it. We then added a material to the object which was a laser-looking shape. We then made the shader 'Particles/Addictive' which got rid of the black around the glow. A ridigbody component was also added so that the code would function. A cylindrical collider was added to shape around the laser beam so that no unnecessary background was still around the glow.




No comments:

Post a Comment

 
© 2012. Design by Main-Blogger - Blogger Template and Blogging Stuff