Skip to content

NineSlice does not respect pivot point of texture set by TexturePacker #6655

@michalfialadev

Description

@michalfialadev

When Phaser.Gameobjects.Image from an atlas made by TexturePacker is added to scene, and the Frame of such image has a custom Pivot Point, this image in Phaser will automatically have it's pivot point set to the pivot point set inside the TexturePacker IDE.

Is same possible to be done, when NineSlice is used for such atlas Frame? Currently the NineSlice created using frame with custom Pivot point will not inherit this custom pivot point. This introduces a discrepancy, when Image or NineSlice is used for same Frame.

image

The image above, when NineSlice is used to display it, will not take it's custom pivot point into account, but will have its origin set to (0.5,0.5)

EDIT: it seems NineSlice doesnt support setOrigin at all. Can it be made to support custom origin?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions