Project (1) Tips
Project (1) Tips
Things that we put in the update in cs will update things every frame
edit--> projectsettings--> inputmanager (to see what are the possible input system
the unity will provide)
Using Time.deltaTime we tell the unity engine to run how many frames per second
Then we multiply something with Time.deltaTime so that our game is frame
independent (means it knows weather the computer is fast or slow)
Example:
Slow computer Fast computer
we usually multiply Time.deltatime with changing axis with the user input so that
both the high end and low end pc covers same diatance
to add the graphical image to the game object first click the game object there is
a circle near the sprite renderer select it and choose your assets
To add colliders we go to components and search collider the thing which donot says
2d is actually 3d
to see weather the body is activated collider or not we can see by turning off
sprites Render(A green colour field will show)
Note: If two bodies need to collide means one object has to be rigid so that one
will move also for a rigid body there is always activated
gravity we should fix it to zero to neglect it
note: this is helpfull when we add boundaries around our game or
undestructable walls etc...
also if we add both the component rigidbody means that they both can interact with
each other
Note:
To create a map first we create a world object and there we create our map by
importing assets to unity engine
CRL + D for duplicate
CTRL + S to save
To select multiple objects we use shift + assets (like car etc) and click
(hold) and drop it the world object