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: AreaComp no longer updates its position when parent's position is updated (beta version) #613

Closed
KeSuave opened this issue Feb 17, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@KeSuave
Copy link

KeSuave commented Feb 17, 2025

Describe the bug

Updating a parent's position does not update area shape position

Version

What version are you running?

4000.0.0-alpha.16

To Reproduce

Steps to reproduce the behavior:

  1. Create a container with a PosComp
  2. Add a child to container with an AreaComp
  3. Move container
  4. Hover over the container

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))
});

Expected behavior

In previous versions, area component gets position updated relative to its parent, test same code in stable version 3000 to see.

@KeSuave KeSuave added the bug Something isn't working label Feb 17, 2025
@amyspark-ng
Copy link
Contributor

is it something like this?
#523
if so this might be a duplicate, but i think it actually describes the issue very well

@KeSuave
Copy link
Author

KeSuave commented Feb 17, 2025

Yes, I do believe that this is a duplicate. Overall area comp no longer get's updated when a parent is.

@amyspark-ng
Copy link
Contributor

could you please please post what you posted here on that issue and reclose this one as duplicate rather than completed

@lajbel lajbel removed this from KAPLAY.js Bugs Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants