Skip to content

Sprite3d: bottom/origin anchor for ground placement (2.5D) #1514

Closed

Description

@obiot

Context

Sprite3d (added in #1513) renders a centered quad. For 2.5D characters (Paper Mario-style), you almost always want the sprite's feet on the ground, which currently means manually offsetting pos.y by half the height.

Proposal

Add an anchor / origin option so the pivot can be placed at the bottom-center (feet), e.g. originPoint: { x: 0.5, y: 1 } or a simple anchor: "bottom" shorthand, applied as a constant offset baked into the local quad (so it composes with billboarding/flip and doesn't affect the cull bounds).

  • Default stays centered (no behavior change).
  • Should work across all billboard modes and with trimmed/rotated atlas frames.

Acceptance

  • new Sprite3d(x, y, { ..., originPoint: { x: 0.5, y: 1 } }) plants the bottom edge at pos.
  • Unit test: corner Y offsets shift by the origin; billboard projection still upright.

Refs: docs note in 2.5D Games ("Ground anchoring" caveat).

Activity

  1. added a commit that references this issue on Jul 8, 2026
    2d11694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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