physics.area.space_override

Client

Enumeration of modes controlling how an area's gravity and damping combine with the physics space


Values

ConstantDescription
physics.area.space_override.DISABLEDThis area does not affect gravity/damping in its space
physics.area.space_override.COMBINEAdds this area's gravity/damping to the calculation, combined with other overriding areas and the default space
physics.area.space_override.COMBINE_REPLACEAdds this area's gravity/damping, then ignores all further (lower priority) areas
physics.area.space_override.REPLACEReplaces the space's gravity/damping entirely with this area's values, combined with other replacing areas
physics.area.space_override.REPLACE_COMBINEReplaces the space's gravity/damping entirely with this area's values, then ignores all further (lower priority) areas

Examples

Set an area to replace gravity entirely
local entity = physics.area.create()

entity:set_gravity_space_override_mode(physics.area.space_override.REPLACE)

On this page