Skip to content

Piecewise axis separate #3418

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

MondayHopscotch
Copy link
Contributor

The existing separation logic does not correctly detect/resolve the following scenario:

  1. Object A's starting position (red dotted box) does not overlap with Object B (black box) on either the X or Y axis
  2. Object A moves to now be overlapping on BOTH axes of Object B (shown by red solid box)
    image

This is caused because the "swept hull's" look at each axis individually before updating Object A's X and Y components.

Current implementation

image

  1. Shows Object A's last (dotted red) and current (solid red) positions
  2. Shows Object A's intermediate position in Yellow
  3. Blue box shows swept hull along X-axis based on Object A's last coordinates
  4. No collision found, so Object A's intermediate x-position is updated
  5. Blue box shows swept hull along Y-axis based on Object A's last coordinates
  6. No collision found, so Object A's intermediate y-position is updated

New implementation

image

  1. Shows Object A's last (dotted red) and current (solid red) positions
  2. Shows Object A's intermediate position in Yellow
  3. Blue box shows swept hull along X-axis based on Object A's last coordinates
  4. No collision found, so Object A's intermediate x-position is updated
  • Not pictured: After this step, we temporarily update Object A's last x-position so that new swept hull captures the correct space
  1. Blue box shows swept hull along Y-axis based on Object A's newly updated last coordinates
  2. No collision found, so Object A's intermediate y-position is updated

Issue discussed in discord here

Reference material that I remembered existed when I started running into this from Leilani's island devlog

@Geokureli Geokureli added this to the 6.2.0 milestone Apr 16, 2025
@Geokureli Geokureli modified the milestones: 6.2.0, 6.1.1 Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants