how to change gravity unity code example
Example: how to change gravity unity
// Four times as strong
Physics2D.gravity = new Vector2(0, Physics2D.gravity.y * 4);
// Half the strength
Physics2D.gravity = new Vector2(0, Physics2D.gravity.y / 2);
// Four times as strong
Physics2D.gravity = new Vector2(0, Physics2D.gravity.y * 4);
// Half the strength
Physics2D.gravity = new Vector2(0, Physics2D.gravity.y / 2);