Skip to content

Gravity Zone

Adds gravitational physics to any GameObject in a world or on a prop. Gravity zones can be inward, outward, neutralize each other, and interact in unusual ways for novel mechanics. They also fit a wide variety of shapes, making them versatile tools.

gravity-default.png

Basic settings for the size, orientation, and shape of the gravity zone.

Dropdown that defines the shape of the gravity zone:

  • Box shape-box.png
  • Sphere shape-sphere.png
  • Capsule (Cylinder uses the same settings) shape-capsule-cylinder.png
  • Cylinder
  • Half Sphere
  • Quarter Sphere
  • Half Capsule
  • Quarter Capsule
  • Half Cylinder
  • Quarter Cylinder
  • Custom shape-custom.png

Only the Custom shape has no center field. Half and quarter variants share their settings with the full shape.

Displacement from the root position on the X, Y, and Z axes.

Distance between faces along the X, Y, and Z axes. This is the distance between faces, not from the center.

Axis that gravity “flows” along. “Toward Center” flows inward to the shape’s center evenly. At default scale, this is measured in meters.

  • Direction X
  • Direction Y
  • Direction Z
  • Toward Center

Distance from center to edge for the spherical or circular component. In meters at default scale.

Distance between the extremes of the shape. In capsules, tip-to-tip; in cylinders, face-to-face. Orientation is identical for half and quarter shapes. In meters at default scale.

Defines specifics about the gravity zone such as intensity and how it interacts with players and objects.

Controls how this Gravity Zone interacts with other Gravity Zones.

  • Override (default) Completely overrides lower-priority zones.
  • Additive Combines this zone with any other zones that do not override it.

Decides which Gravity Zones take priority when multiple absolute zones overlap. Higher values win. Default is 0.

Uses a smaller collision box for influence detection. Useful for larger transitions between surfaces (for example, a quarter cylinder on a rounded floor-to-wall transition). Not ideal for most uses — the smaller collision shape is significantly smaller than a player. Leave this disabled unless influence is being applied when it should not be.

Method used to define the acceleration force of the zone.

  • Absolute (default): Uses the strength value directly in m/s².
  • Relative: Sets strength as a multiplier of the world’s gravity or overlapping zones’ gravity.

Acceleration force applied to affected objects. Negative values invert the flow direction; useful for reversing axes or making repulsive forces.

Checklist of objects affected by the Gravity Zone:

  • Nothing
  • Everything (includes objects and players)
  • Objects (props and world physics items)
  • Players

How the zone reorients the player when they enter (unless set to disabled).

  • Auto Aligns the player to the direction of gravity at a speed relative to the field’s strength. Default and recommended unless you have a specific reason otherwise.
  • Disabled No player reorientation.
  • Instantly Snaps the player to the direction of gravity immediately on influence.
  • Custom
    • Rotation Speed (Degrees/second): Rotation speed for the custom alignment.

editor-gizmos.png

Editor-only visualization options.

Toggles the visualization on or off completely.

Toggles the gravity “flow” visualization but keeps the border of the zone visible.

Visualizer opacity from 0 (invisible) to 1 (solid). Default is 0.5.

Half and quarter variants stack a shape collider plus a box collider that masks out the unwanted half or quarter. Each zone runs on a generated trigger child GameObject on layer 2.

Zone ShapePrimary colliderAdditional masking collider
BoxBoxCollider
SphereSphereCollider (radius = size.x)
HalfSphere / QuarterSphereSphereColliderBoxCollider cutting off the unused portion
CapsuleCapsuleCollider (radius = size.x, height = size.y)
HalfCapsule / QuarterCapsuleCapsuleColliderBoxCollider
CylinderCapsuleCollider (height = size.y + 2 * size.x)BoxCollider
HalfCylinder / QuarterCylinderCapsuleColliderBoxCollider
CustomConvex MeshCollider from customZoneShapeMesh— — the component destroys itself if the mesh is missing.
  • Strength is clamped to ±10000 and Strength drives gravity acceleration in m/s² (Absolute type) or as a factor (Relative type).
  • Gravity Falloff is a curve evaluated from 0 at the zone center to 1 at the bounds (game-side usage; the CCK stores the curve).
  • Player Gravity Alignment Mode and Player Gravity Custom Alignment Value are read by the game-side gravity system when a player is inside the zone.

There are currently no examples. If you would like to add one, please contribute. Community contributions can be submitted to our Documentation GitHub.

  • CVR-GameFiles/ABI.CCK.Components/GravityZone.cs