Preparing search index...

    Cylindrical physics shape with configurable axis, length, and radius.

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

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

    // Create a cylinder shape and configure it
    const cylinder = Editor.Shape.createCylinderShape(scene);
    cylinder.radius = 0.75;
    cylinder.length = 2.5;
    cylinder.axis = Editor.Axis.Z;
    collider.shape = cylinder;

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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    axis: Axis

    The axis along which the cylinder is oriented.

    id: Uuid

    The unique id of the entity.

    length: number

    The height of the cylinder along its axis.

    meta: Meta

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

    radius: number

    The radius of the cylinder's circular cross-section.

    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