Jump to content

Custom Bounds Calculation with Hull


peterje
 Share

Recommended Posts

In a project I am working on I wish to have bounds for my display objects be more accurate than a rectangle. For example, this balloon sprite currently collides with everything in its default AABB bounds. However according to the documentation I can override calculateBounds   and define a hull for this object. How might I go about that for a large collection of sprites I have stored as a PNG? Do I have to manually map out the hull for each sprite or is there a built in algorithm to do this for png with transparent backgrounds?

 

  

image.png.aa5039c9e3979ab26082a489d779167b.png

 

image.png

Edited by peterje
Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...