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

Totk: Feature Request: mark missing korok seeds by region #368

Open
mrissaoussama opened this issue Jun 23, 2023 · 3 comments
Open

Totk: Feature Request: mark missing korok seeds by region #368

mrissaoussama opened this issue Jun 23, 2023 · 3 comments

Comments

@mrissaoussama
Copy link

sometimes if i use all 300 pins, the korok pins will be all over the place, would it be possible to mark missing seeds in a certain region first before moving to the next?

@marcrobledo
Copy link
Owner

It's not impossible, but that would require someone to rearrange the order of all seeds in the sourcecode, which sounds like a very time consuming task.

@firehawkx
Copy link

firehawkx commented Jul 24, 2023

I was actually wondering if it could be possible to sort by distance, for any of the "add pins" feature.

So if you add 50 pins, it would add the 50 closest to where you currently are.

I am totally willing to help out (either by making a script to re-arrange the sourcecode), or to make a vector3 distance sub-module (if thats even possible) that can dynamically calculate the distance from link current saved position.

That would be a really great addition to the feature :)

EDIT :
I had a script I used in C# (Unity Dev) that did something similar... I had GPT convert it to "js" / unsure if its well made or if it could be used, but here it is in case it could :)

function calculateDistance(x1, y1, z1, x2, y2, z2) {
  const distanceSquared = Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2) + Math.pow(z2 - z1, 2);
  const distance = Math.sqrt(distanceSquared);
  return distance;
}

// Calculate distances for all coordinates and store them in a new array
const distances = allCoordinates.map(coord => {
  return {
    coordinate: coord,
    distance: calculateDistance(Coord1.x, Coord1.y, Coord1.z, coord.x, coord.y, coord.z),
  };
});

// Sort the distances array based on the distance value
distances.sort((a, b) => a.distance - b.distance);

// Extract the sorted coordinates from the distances array
const sortedCoordinates = distances.map(item => item.coordinate);

@marcrobledo
Copy link
Owner

That sounds like a good idea @firehawkx ! I'll think on it whenever I get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants