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

Incorrect dimension for Caterpillar #81

Open
alistair3149 opened this issue Sep 25, 2023 · 7 comments
Open

Incorrect dimension for Caterpillar #81

alistair3149 opened this issue Sep 25, 2023 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@alistair3149
Copy link
Contributor

The dimension of Caterpillar on the ship API seems to be incorrect.

@octfx octfx added the bug Something isn't working label Sep 28, 2023
@alistair3149
Copy link
Contributor Author

Upon investigation, it seems that it is not an uncommon occurrence. The bounding box size in the data do not always follow the same orientation. The same issue can be found for the Carrack as well.

@octfx
Copy link
Member

octfx commented Oct 11, 2023

I hoped the Carrack would be the only outlier..
Seems like we'd need to manually define the orientation for each ship?

@alistair3149
Copy link
Contributor Author

Likely. However almost all human ships have the length as the longest edge, so at least it can be somewhat automated

@ari-party
Copy link

ari-party commented Oct 13, 2023

Likely. However almost all human ships have the length as the longest edge, so at least it can be somewhat automated

Hercules series refutes this.

My suggestion is to have a table for each of the bugging ships to instruct the processing code what each side of the bounding box is.

Example

You have a ship that's 50m in width, 40m in length, 20m in height. (Complete bullshit, take a Hercules in mind) Right now the API thinks it's 40m in height and 20m in width)

So you make a table in json where the first value belongs to the largest number in the scale of the ship.

["width", "length", "height"]

The API or processing code would compare the width, height and length (scale) with eachother to make another table that's largest to smallest.

[50, 40, 20]

Now you can get make a dictionary by using the first json as the keys and the second as the values by index.

{
    "width": 50,
    "length": 40,
    "height": 20
}

Keep in mind that are these values are fake and just for demonstration purposes, reply if you have a question or want to add something to my suggestion. 👍

@octfx
Copy link
Member

octfx commented Nov 5, 2023

I like the idea, and think it would be best to fix this directly when creating the json files.
The sizes are handled here: https://github.com/StarCitizenWiki/scunpacked/blob/4bdb320fefd0be9479dc819afaa0228e0e911de7/Loader/ShipLoader.cs#L530

@ari-party
Copy link

Might it be best to implement my solution on the Unpacker?

@octfx
Copy link
Member

octfx commented Nov 13, 2023

That'd be the best place to implement it, yes :)

@octfx octfx added the help wanted Extra attention is needed label Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants