PointForceComponent

Author: GameDevGuy

Description
This is a work-in-progress component that simulates gravitational forces within a "circular zone". Useful for creating planets, magnets, or other objects that should attract other objects. Please note both the code and this wiki are both a WIP. Feedback is welcome.

Requirements
Unity 4.3

Usage
1. Create an empty game object

2. Add a CircleCollider2D (required) to the empty object.

3. Add this PointForceComponent to the empty object, then adjust its properties. For my initial test, I used the following values in the inspector:

Non Linear: True

Force: 5

Linear Drag: 0.1

Angular Drag: 0

Tracked Object: A simple circle sprite I named "planetoid"

'''Note: Only affects game objects that have the Rigid Body 2D and Collider 2D components. In my test, I used a crate sprite that had a mass of 0.5 and a BoxCollider2D that fit its edges'''