Preparing search index...

    Cone-shaped physics collider.

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

    // Create a scene object with a cone collider
    const obj = scene.createSceneObject('PhysicsObject');
    obj.name = 'ConeColliderObject';
    const collider = obj.addComponent('ColliderComponent');

    // Create a cone shape and configure dimensions
    const cone = Editor.Shape.createConeShape(scene);
    cone.radius = 1.0;
    cone.length = 3.0;
    cone.axis = Editor.Axis.Y;
    collider.shape = cone;

    console.log(`Created cone collider on: ${obj.name}`);
    console.log(` radius: ${cone.radius}, length: ${cone.length}, axis: Y`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    axis: Axis

    Direction the cone points along.

    id: Uuid

    The unique id of the entity.

    length: number

    Height of the cone.

    meta: Meta

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

    radius: number

    Base radius of the cone.

    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