All Classes Files Functions Variables Enumerations
Classes | Public Member Functions | Public Attributes | List of all members
World Class Reference

Classes

class  DebugSettings

Public Member Functions

void SetPhysicsSystem (WorldPhysicsSystem s)
bool GetGravityActive ()
void SetGravityActive (bool b)

Public Attributes

bool gravityActive = true
float gravityStrength = 1
float effectiveGravity = 0
DebugSettings debugging

Detailed Description

This class represents a point of gravitational attraction

This class acts as a center of gravitational attraction in a WorldPhysicsSystem. To be effective, this must be added to a WorldPhysicsSystem via the inspector or via the method WorldPhysicsSystem.AddWorld(...).

The gravityStrength variable is multiplied by WorldPhysicsSystem.gravityScalar. WorldPhysicsSystem uses these variables to derive the effective gravity of thh world.

:: This class is not mean for general coding use ::

See Also
WorldPhysicsSystem

Member Function Documentation

bool World.GetGravityActive ( )

Returns if this world is causing gravity or not

Returns
True if this world is causing gravity, false otherwise.
See Also
gravityActive
SetGravityActive
void World.SetGravityActive ( bool  b)

Sets if the world will cause gravity

Parameters
bIf true, this world will cause gravity. False otherwise.
See Also
gravityActive
GetGravityActive
void World.SetPhysicsSystem ( WorldPhysicsSystem  s)

This method assigns the World to a WorldPhysicsSystem.

The world exerts gravity during the FixedUpdate of a WorldPhysicsSystem, so if this is not set, the world will have no effect on the gamespace.

In general practice, add a World via WorldPhysicsSystem.AddWorld(...). That will handle all the underlying relationship setup. This is not meant for general coding use.

Parameters
WorldPhysicsSystems This is the system that will be assigned to the World.

Member Data Documentation

DebugSettings World.debugging

A wrapper for debugging settings

float World.effectiveGravity = 0

The effective gravity including system multiplier

This stores the result of the gravityStrength times the WorldPhysicsSystem's multiplier.

See Also
WorldPhysicsSystem.GravSettings.gravityScalar
gravityStrength
bool World.gravityActive = true

A boolean which toggles if this world will cause gravity.

See Also
GetGravityActive
SetGravityActive
float World.gravityStrength = 1

The local multiplier for gravity strength.

The actual gravity caused by the world is gravityStrength multiplied by the WorldPhysicsSystem's multiplier.

See Also
effectiveGravity
WorldPhysicsSystem.GravSettings.gravityScalar

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