Skip to main content

Defaults

The built-in defaults used when a WorldConfig field is omitted. Exposed at the top level as Hindsight.Defaults so debug tooling can introspect the values the world is actually running with, and so user code can clone-and-edit a single field without rewriting an entire config block.

local rollback = table.clone(Hindsight.Defaults.rollback)
rollback.lifetime = 2 -- longer history for very high-ping games

local world = Hindsight.createWorld({
    actorContainer    = ServerScriptService,
    definitionsModule = definitionsModule,
    rollback          = rollback,
})

Properties

rigs

Defaults.rigs: {[string]Rig}

Hitbox layouts for the built-in R15 and R6 rigs. The sizes come from default Roblox avatar measurements (half-extents in studs).

rollback

Defaults.rollback: RollbackConfig

Default snapshot store configuration:

lifetime   = 1
voxelSize  = 32
gridCenter = Vector3.zero
gridSize   = Vector3.new(4096, 512, 4096)
hitboxSize = Vector3.new(3, 3, 3)
rigs       = Defaults.rigs

penetration

Defaults.penetration: PenetrationConfig

Default penetration model:

surfaceHardness        = { [Wood] = 2, [Concrete] = 10 }
defaultHardness        = 10
ricochetHardness       = 10
mediumGapThreshold     = 0.1
maxCompoundMediumParts = 32
Show raw api
{
    "functions": [],
    "properties": [
        {
            "name": "rigs",
            "desc": "Hitbox layouts for the built-in `R15` and `R6` rigs. The sizes come from\ndefault Roblox avatar measurements (half-extents in studs).",
            "lua_type": "{ [string]: Rig }",
            "source": {
                "line": 86,
                "path": "src/Defaults.lua"
            }
        },
        {
            "name": "rollback",
            "desc": "Default snapshot store configuration:\n```\nlifetime   = 1\nvoxelSize  = 32\ngridCenter = Vector3.zero\ngridSize   = Vector3.new(4096, 512, 4096)\nhitboxSize = Vector3.new(3, 3, 3)\nrigs       = Defaults.rigs\n```",
            "lua_type": "RollbackConfig",
            "source": {
                "line": 101,
                "path": "src/Defaults.lua"
            }
        },
        {
            "name": "penetration",
            "desc": "Default penetration model:\n```\nsurfaceHardness        = { [Wood] = 2, [Concrete] = 10 }\ndefaultHardness        = 10\nricochetHardness       = 10\nmediumGapThreshold     = 0.1\nmaxCompoundMediumParts = 32\n```",
            "lua_type": "PenetrationConfig",
            "source": {
                "line": 115,
                "path": "src/Defaults.lua"
            }
        }
    ],
    "types": [],
    "name": "Defaults",
    "desc": "The built-in defaults used when a [`WorldConfig`](Hindsight#WorldConfig)\nfield is omitted. Exposed at the top level as `Hindsight.Defaults` so debug\ntooling can introspect the values the world is actually running with, and\nso user code can clone-and-edit a single field without rewriting an entire\nconfig block.\n\n```lua\nlocal rollback = table.clone(Hindsight.Defaults.rollback)\nrollback.lifetime = 2 -- longer history for very high-ping games\n\nlocal world = Hindsight.createWorld({\n    actorContainer    = ServerScriptService,\n    definitionsModule = definitionsModule,\n    rollback          = rollback,\n})\n```",
    "source": {
        "line": 78,
        "path": "src/Defaults.lua"
    }
}