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

bug: Areas work weirdly when scaling on children objs #523

Open
amyspark-ng opened this issue Nov 19, 2024 · 3 comments
Open

bug: Areas work weirdly when scaling on children objs #523

amyspark-ng opened this issue Nov 19, 2024 · 3 comments
Assignees
Labels
bug Something isn't working v4000 This bug is only present on the v4000
Milestone

Comments

@amyspark-ng
Copy link
Collaborator

amyspark-ng commented Nov 19, 2024

When a parent object has a children object, and the children object has an area, if you change the scale of the children object its area will get disabled somehow

If children object changes the pos, position of the area will stay instead of moving with children

This happens since kaplay v4000 alpha 11 i think, probably this commit 56340e4 since it's the only one since alpha 10 and 11 that changes stuff related to area

2024-11-19_11-07-04.mp4
@amyspark-ng amyspark-ng added the bug Something isn't working label Nov 19, 2024
@lajbel lajbel added the v4000 This bug is only present on the v4000 label Nov 28, 2024
@lajbel lajbel added this to the 4000 milestone Jan 20, 2025
@lajbel lajbel moved this to Todo in KAPLAY.js Bugs Jan 21, 2025
@KeSuave KeSuave marked this as a duplicate of #613 Feb 17, 2025
@KeSuave
Copy link

KeSuave commented Feb 17, 2025

GameObj<AreaComp> does not update when ancestors are updated. Example:

kaplay();

debug.inspect = true;

const container = add([pos(center())]);
const shape = container.add([area(), rect(20,20)]);

wait(1, () => {
    container.moveTo(vec2(10,10))
});

After one sec, if one hovers over the rect shown, nothing happens. If one hovers over the original position near the center, the inspector shows the data for the shape.

@mflerackers
Copy link
Member

mflerackers commented Feb 17, 2025 via email

@mflerackers
Copy link
Member

Until it's fixed, you can give the parent an area and it will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v4000 This bug is only present on the v4000
Projects
Status: Todo
Development

No branches or pull requests

4 participants