Archon.SwissArmyLib.Gravity Namespace |
Class | Description | |
---|---|---|
GravitationalEntity |
Makes this GameObject's Rigidbody part of the gravitational system.
For 2D physics see GravitationalEntity2D.
| |
GravitationalEntity2D |
Makes this GameObject's Rigidbody2D part of the gravitational system.
For 3D physics see GravitationalEntity.
| |
GravitationalSystem |
A gravitational system to allow for a more flexible gravity instead of just a constant directional gravity.
Useful for planets, black holes, magnets etc.
Rigidbodies that should be affected should have the GravitationalEntity component (or GravitationalEntity2D if using 2d physics).
Add gravitational forces by implementing the IGravitationalAffecter interface and registering it in the system.
See SphericalGravitationalPoint for a simple example implementation.
Remarks You might want to set Unity's gravity to (0,0,0). | |
SphericalGravitationalPoint |
A sphere-shaped gravitational point.
Remarks The force is currently constant and not dependent on how close the entities are. |
Interface | Description | |
---|---|---|
IGravitationalAffecter |
Represents a gravitational pull on entities.
|