Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

314
Views
How to get size of bounding box in Phaser 3, Spine?

If i write sprite.drawDebug = true, it will show bouding box.

Bounding box in Spine 2D

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Depending what exactly you need, it will be more or less difficult since this data is not exposed in a "user friendly" way (as far as I know) here is the link to the documentaiton

The SpinePlugin uses the sprite.drawDebug = true flag to show many different parts of the spine data.
In this example you can see, how this parts a divided: https://phaser.io/examples/v3/view/spine/draw-debug-bounds#

screenshot example

With the Buttons you can switch on and off the different parts

Depending on which group of boxes you need, you would have to access the data, similar as the plugin itself. (here is the link to the plugin source code around lines 9936 ~ 10095 ). The data should be in the property sprite.skeleton , but you would have to find the parts you really need.

Update:
if you are using physics and the physics bounding box is enough, like in this example: https://phaser.io/examples/v3/view/spine/arcade-physics-spine-body#

you could get the size of the bounding box with image.body.width and image.body.height, and you can alter it also with setSize.

screenshot physics altered example

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!