All Classes Files Functions Variables Enumerations
Public Attributes | List of all members
WorldPhysicsSystem.GravSettings Class Reference

Public Attributes

float gravityScalar = 1
GravityMode gravityMode = GravityMode.Constant
float distanceDecay = 2

Detailed Description

This wraps the settings used to configure the system in the inspector

See Also
gravitySettings

Member Data Documentation

float WorldPhysicsSystem.GravSettings.distanceDecay = 2

This variable controls the rate of decay of the effect of gravity over distance. In all non-MANUAL GravityModes, this is set by the WorldPhysicsSystem and can not be modified. In MANUAL mode, changing this value modifies the behaviour of gravity.

The range of values is as follows: <1: logarithmic decay 1: linear decay >1: exponential decay 2: realistic decay

See Also
gravityMode
SetGravityDecay
GetGravityDecay
GravityMode WorldPhysicsSystem.GravSettings.gravityMode = GravityMode.Constant

This sets the gravity mode used by the system.

The details of what each mode means in practice can be found in the enum documentation. In all modes except GravityMode.MANUAL, the distanceDecay is set to match the desired effect. In Manual mode, you need to set the distance decay to what you would like to use.

See Also
distanceDecay
GetGravityMode
SetGravityMode
float WorldPhysicsSystem.GravSettings.gravityScalar = 1

The multiplier applied to all Worlds in the system

This is the multiplier applied to World.gravitySrength to create World.effectiveGravity. It is intended that you use World.gravityStrength to set up relative gravity strengths, and then use this multiplier to bring them up to the strength you desire.

Note that zero and negative values are allowed. Negative is repulsion, not gravity. Zero Simply deactivates the system until it is a non-zero value.

See Also
World.effectiveGravity
World.gravityStrength

The documentation for this class was generated from the following file: