Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-Game: Add a function for generating a physics collision shape from a given sprite #9472

Closed
jackerley opened this issue Feb 20, 2025 · 2 comments
Assignees
Labels
feature request New feature (or a request for one)
Milestone

Comments

@jackerley
Copy link

Is your feature request related to a problem?

Requested by GX team for their physics sandbox

Describe the solution you'd like

Add a function that will take a sprite and a complexity parameter and generate a physics collision shape from it.

NB. we should then backport this functionality to the IDE once it's working well at runtime

Describe alternatives you've considered

No response

Additional context

No response

@jackerley jackerley added the feature request New feature (or a request for one) label Feb 20, 2025
@stuckie stuckie moved this from Triage to Backlog in Team Workload Feb 21, 2025
@YYDan YYDan moved this from Backlog to Done in Team Workload Mar 6, 2025
@YYDan YYDan added this to the 2024.13 milestone Mar 6, 2025
@YYDan
Copy link
Collaborator

YYDan commented Mar 6, 2025

This is already in 2024.1300, so have added the missing milestone and updated the status now.

@YYDan YYDan closed this as completed Mar 6, 2025
@YYDan YYDan changed the title Add the ability to generate a physics collision shape from a given sprite at runtime In-Game: Add a function for generating a physics collision shape from a given sprite Mar 6, 2025
@YYDan
Copy link
Collaborator

YYDan commented Mar 6, 2025

sprite_get_convex_hull()

This function is used to generate the points of a convex hull for the given sprite. You supply a sprite index (which can be an asset added through the Asset Browser or a sprite added at runtime) and the function returns an array of reals defining the points of the convex hull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature (or a request for one)
Projects
Status: Done
Development

No branches or pull requests

3 participants