• Set the origin in which all position related will be relative to. In other words, the anchor of the object. Mutate the object.

    Parameters

    • obj: GameObject

      object to be set

    • x: number

      new anchor x coordinate, between value 0 to 1.

    • y: number

      new anchor y coordinate, between value 0 to 1.

    Returns GameObject | undefined

    game object itself