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

feat: Improved hitboxes and collisions #81

Open
sharmnten opened this issue May 31, 2024 · 3 comments
Open

feat: Improved hitboxes and collisions #81

sharmnten opened this issue May 31, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sharmnten
Copy link

sharmnten commented May 31, 2024

The problem
I'm always frustrated when in my game, the hit-boxes of various game objects are slightly to large, resulting in the player being able to float off corners.

The solution
I would like Improved hit boxes and collision recognition in kaplay.

Additional context
image

@sharmnten sharmnten added the enhancement New feature or request label May 31, 2024
@niceEli
Copy link
Member

niceEli commented May 31, 2024

can you enable debug to show the hitboxes (F1 key or debug.inspect = true)

@sharmnten
Copy link
Author

image

@sharmnten sharmnten reopened this May 31, 2024
@niceEli
Copy link
Member

niceEli commented Jun 1, 2024

this happens because of the bounding box for the hitbox being the size of the sprite

if you would like to customize it then you can change the size using the the area component API
https://kaplayjs.com/reference/#area

@lajbel lajbel added this to the 4000 milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: TODO
Development

No branches or pull requests

4 participants