Preparing search index...

    Asset configuring global physics simulation settings.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const assetManager = model.project.assetManager;
    const worldSettingsList = assetManager.assets.filter(
    a => a.getTypeName() === Editor.Assets.Physics.WorldSettingsAsset.getTypeName()
    ) as Editor.Assets.Physics.WorldSettingsAsset[];
    if (worldSettingsList.length === 0) {
    console.log('No WorldSettingsAsset found');
    return;
    }
    const settings = worldSettingsList[0];

    // Inspect core simulation properties: gravity, absoluteSpeedLimit, simulationRate
    // Check layer collision pair (layers 0 and 1)
    const canCollide = settings.getLayersCollidable(0, 1);
    const dm = settings.defaultMatter;
    const friction = Editor.isNull(dm) ? 'n/a' : dm.friction;

    console.log(`WorldSettingsAsset "${settings.name}": gravity=${settings.gravity}, layers 0+1 collidable=${canCollide}, defaultMatter.friction=${friction}`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    absoluteSpeedLimit: number

    Maximum velocity magnitude any rigid body can reach.

    cacheFile: Path

    Path to the cached asset file.

    defaultFilter: Filter

    Default collision filter applied to new physics objects.

    defaultMatter: Matter

    Default material properties for new physics objects.

    Import metadata for the asset.

    gravity: vec3

    Gravitational acceleration vector applied to the world.

    id: Uuid

    The unique id of the entity.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    name: string

    The name of the asset.

    relativeSpeedLimit: number

    Speed limit relative to an object's mass.

    simulationRate: number

    Timestep frequency for physics calculations per second.

    slowDownStep: number

    Time reduction per simulation step when slowdown is active.

    slowDownTime: number

    Duration to apply physics slowdown when triggered.

    type: string

    The entity's type.

    Methods

    • Return whether two physics layers can collide.

      Parameters

      • layerNumberA: number
      • layerNumberB: number

      Returns boolean

    • Returns the name of this object's type.

      Returns string

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object refers to the same instance as the given object.

      Parameters

      Returns boolean