Unity built in physics engine provide components that handle physical simulation.
Rigidbody2D is one of the main component among the unity physics engine that allow
sprite to be moved in a physically convincing way by applying forces from the scripting
API. This means that the sprite will be affected by gravity and can be controlled from scripts
using forces.
By adding the appropriate collider component, the sprite will also respond to collisions with other sprites.
In order to manually add Rigidbody2d on object go to:-
Prefab->Add Component->Physics2d->Rigidbody2d
Once Rigidbody2d is implemented, it looks like
Once Rigidbody2D component is added, feel free to make changes on different properties like Mass, Linear Drag, Angular Drag etc. of the Rigidbody2D as per requirement.
Thanks!
0 Comment(s)