Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 3.59 KB

INSTALLING.md

File metadata and controls

66 lines (43 loc) · 3.59 KB

Installing

Downloading

  1. Download the latest Unity Package. Check the releases on this repository to find the version you want, or click here for the latest release.
  2. Extract the Unity Package in your project.

Setting up your project

3D

Optional - If you leave Global Gravity on, objects will still react as normal as well with the gravity sources, however you might want to make global gravity weaker or gravity sources stronger - Set 3D global gravity to 0.

  • To change 3D physics, go to ProjectSettings -> Physics

3D Gravity

2D

Optional - If you leave Global Gravity on, objects will still react as normal as well with the gravity sources, however you might want to make global gravity weaker or gravity sources stronger - Set 2D global gravity to 0.

  • To change 2D physics, go to ProjectSettings -> Physics 2D

2D Gravity

Setting up an item

3D

  1. Apply a Collider and Rigidbody to your item.
  2. Make sure Use Gravity is TRUE on the rigidbody. If Use Gravity is false, it will not be affected by the gravity sources.
  3. Add a GravityItem Script to the item.

2D

  1. Apply a Collider2D and Rigidbody2D to your item.
  2. Make sure Gravity Scale is ABOVE 0 on the rigidbody. If Gravity Scale is below 0, it will not be affected by the gravity sources.
  3. Add a GravityItem2D Script to the item.

Setting up a Gravity Source

3D

  1. Create an Empty GameObject in the centre of your planet or platform.
  2. Add a Collider - You can use any collider, but sphere colliders are best for planet gravity
  3. Make sure Is Trigger is TRUE on the collider.
  4. You can add multiple colliders and they will all work as the gravity field. - But they MUST be on this GameObject
  5. Add any gravity source script to the GameObject with the Colliders.
  6. Optional - Set the Gravity Strength on the Gravity Source. The default gravity is Earth's Gravity
  7. Optional - Set Enable Debug to true to see the radius of the Gravity Source and what objects are being affected by the Gravity Source.
  8. Optional - On Directional Gravity Set Gravity Direction to control which way gravity will face. The default option is down.

Planet Gravity

2D

  1. Create an Empty GameObject in the centre of your planet or platform.
  2. Add a Collider2D - You can use any collider, but circle colliders are best for planet gravity
  3. Make sure Is Trigger is TRUE on the collider 2D.
  4. You can add multiple colliders and they will all work as the gravity field. - But they MUST be on this GameObject
  5. Add any Gravity Source 2D script to the GameObject with the Colliders.
  6. Optional - Set the Gravity Strength on the Gravity Source. The default gravity is Earth's Gravity
  7. Optional - Set Enable Debug to true to see the radius of the Gravity Source and what objects are being affected by the Gravity Source.
  8. Optional - On Directional Gravity Set Gravity Direction to control which way gravity will face. The default option is down.

Planet Gravity 2D