I setup small scene with some blocks and spheres. i added Rigidbody component to spheres. if we do not add Rigidbody then sphere will pass through the blocks without stopping and without any collision.

We will see how to use triggers in collision,

Unity have build in physics system which will do mathematical calculation, physics etc. itself and allow us to save lot more time. We have to add some physics related components to our objects to use unity’s physics system.

In unity we have to add Rigidbody and Colliders to use physics…

Be ready, Enemy Space ships are spotted…We are going for real war

…just kidding.

To spawn enemy battle ships we need to create prefab of enemy ship and then use same steps as as we used for laser. …

In previous article we “Shoot Laser” from our space ship.

At the time we can fire laser without any intervals. which is very easy for player and not appropriate. we need to write some code which will add time interval in laser shooting. Add new variable called _fireRate. assign some…

So now our next step is to shoot Lasers from our Space ship. To shoot laser from our space ship we need to create Laser object.

First step is same as creating player object that is, right click in hierarchy window and go to 3d object and select “Capsule”, name…

Pseudo code is like note, we can add some information or note related to any specifics.

Green code followed by double slash Pseudo code,

To become better programmer, writing pseudo code is best practice. It help to maintain good architecture for our project as well as our own understanding on project.

pseudo code, is reliable asset when we…

variable are like containers that hold or store given values in memory.

In real life we store the location of houses, shops in our minds, name of a person, etc.. variables work also like this we use variables in programming to store the value of different data types.

Variable are essential to store the value.

In C#, there are types of data types like bellow,

Simple player movement:

We created our first script, now we are going to write code for player movement in it. Drag and drop this script on player Object so that we can use it for it.

Drag player script on the player object in the inspector panel.

There are several ways to make code for player movement and we can add…

Create First Script :

Right-click in project panel -create -C# Script. It will create a script with the name NewBehaviourScript. we need to change its name immediately after create it by pressing backspace or simply type the name “Player”.

If we click elsewhere before changing its name then it will be given the name…

Sudarshan Thube

Unity Game Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store