Skip to content

Defined Snapping Points #1

@Vorlias

Description

@Vorlias

The idea here is that the GUI can snap to certain predefined points defined by the user on the screen - e.g. left side, centre or right side of the screen.

Using the v2 API, it could be something like:

const controller = Snapdragon.createDragController(gui, options, {
   // ... other snap options
   SnapPoints: [
      // ... Array of snap points
   ]
});

// Also
controller.SetSnapPoints([
   // Array of snap points
]);

A snap point could be an interface like such:

interface SnapPoint {
   Position: UDim2; // The position of this snap point
   Anchor: Vector2 | undefined; // The anchor (center) of the GUI's relative snap point
}

Maybe could be other behaviours to it, like snap margins as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions