Preparing search index...

    A physics shape using a level set asset for complex collision geometry.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    // Create a scene object with a level-set collider
    const obj = scene.createSceneObject('PhysicsObject');
    obj.name = 'LevelSetColliderObject';
    const collider = obj.addComponent('ColliderComponent');

    // Create a level set shape — uses SDF-based collision from a LevelsetColliderAsset
    const levelSet = Editor.Shape.createLevelSetShape(scene);
    collider.shape = levelSet;

    console.log(`Created level set collider on: ${obj.name}`);
    console.log(` Assign a LevelsetColliderAsset to levelSet.asset for SDF collision`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    The level set asset that defines the shape's geometry and collision data.

    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.

    type: string

    The entity's type.

    Methods

    • 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