This page is in progress and may contain incomplete information or editor's notes.
|
The Galaxy games feature a unique gravity engine that consists of many different gravity areas. Each gravity area affects a portion in space in a different way. The areas, like any other object in the game, can be placed in a galaxy or an individual zone and the instances are defined in the PlanetObjInfo file of a stage's Placement layer. Multiple gravity areas can intersect. The gravity with the highest priority will be used to calculate the gravity vector. However, if multiple gravities with the same priority intersect, the individual gravity vectors will be calculated and then combined. Gravity can also be used to change the direction of shadows. Gravity vectors can be inverted as well.
Gravity Types
The Galaxy games provide multiple gravity types:
Object Name |
Class Name |
Visualization |
Used in SMG1? |
Used in SMG2? |
Description |
Parameters
|
GlobalPointGravity |
PointGravity |
 |
✓ |
✓ |
Simple spherical gravity that pulls objects towards its center point. The sphere's radius is configured by the Range and Distant settings.
|
n/a
|
GlobalWireGravity |
WireGravity |
 |
✓ |
✓ |
|
- Obj_arg0, int: Number of control points excluding start and end
- CommonPath_ID: The path that is used to calculate the control points.
|
GlobalPlaneGravity |
ParallelGravity |
|
✓ |
✗ |
Planar gravity that pulls objects towards a plane. The area of range is a sphere. |
n/a
|
GlobalPlaneGravityInBox |
ParallelGravity |
 |
✓ |
✓ |
Planar gravity that pulls objects towards a plane. The area of range is a box.
|
- Obj_arg0, float: Base distance
- Obj_arg1, int: Distance calc type (* = default, 0 = X, 1 = Y, 2 = Z)
|
GlobalPlaneGravityInCylinder |
ParallelGravity |
|
✓ |
✓ |
Planar gravity that pulls objects towards a plane. The area of range is a cylinder.
|
- Obj_arg0, float: Base distance
|
GlobalDiskGravity |
DiskGravity |
 |
✓ |
✓ |
Disk-shaped gravity that pulls objects towards its center.
|
- Obj_arg0, bool: Both sides enabled?
- Obj_arg1, bool: Edge gravity enabled?
- Obj_arg2: float: Valid degree (default is 360.0)
|
GlobalDiskTorusGravity |
DiskTorusGravity |
 |
✓ |
✓ |
Torus-shaped gravity that is similar to disk-shaped gravity, but features a large hole in the center.
|
- Obj_arg0, bool: Both sides enabled?
- Obj_arg1, int: Edge type
- Obj_arg2: float: Disk radius
|
GlobalCubeGravity |
CubeGravity |
 |
✓ |
✓ |
Cube-shaped gravity that pulls objects towards the center.
|
- Obj_arg0, int: Active faces
- Obj_arg1, int: Active faces
- Obj_arg2, int: Active faces
|
GlobalConeGravity |
ConeGravity |
 |
✓ |
✗ |
Gravity that is shaped like a cone.
|
- Obj_arg0, bool: Bottom face enabled?
- Obj_arg1, float: Top cut rate
|
GlobalSegmentGravity |
SegmentGravity |
 |
✓ |
✓ |
|
- Obj_arg0, int: Valid edges
- Obj_arg1, float: Valid side angle in degrees (default is 360.0)
|
GlobalBarrelGravity |
BarrelGravity |
|
n/a |
✓ |
Cylindrical gravity that creates a limited 2D area around itself in the horizontal plane. Used by 2D passages such as the ship in Sky Station Galaxy.
|
|
ZeroGravitySphere |
ParallelGravity |
|
n/a |
✓ |
Area which has no gravity of its own. Each object within this area has its own gravity based on its momentary rotation. This can also be changed by contact with collision, which rotates the object and thus changes its gravitational direction.
|
|
ZeroGravityBox |
ParallelGravity |
|
n/a |
✓ |
Same as ZeroGravitySphere, but the area is box shaped.
|
|
ZeroGravityCylinder |
ParallelGravity |
|
n/a |
✗ |
Same as ZeroGravitySphere, but the area is cylinder shaped.
|
|
Common Properties
Field |
Type |
Default value |
Description
|
Range |
FLOAT |
|
|
Distant |
FLOAT |
|
|
Priority |
LONG |
|
|
Inverse |
LONG |
|
|
Power |
STRING_OFFSET |
|
|
Gravity_type |
STRING_OFFSET |
|
|
SW_A |
LONG |
-1 |
|
SW_B |
LONG |
-1 |
|
SW_SLEEP SW_AWAKE |
LONG |
-1 |
|
Trivia