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

Identity transform matrix for colliders #27

Open
miniwolf opened this issue Mar 19, 2023 · 2 comments
Open

Identity transform matrix for colliders #27

miniwolf opened this issue Mar 19, 2023 · 2 comments

Comments

@miniwolf
Copy link

On the model: gov_c_ext_bottom_platform_24x12x1m
The colliders c_box_1, c_box_2, etc. all have the identity transform matrix when exported.
When verifying this with the in game editor I can see that the colliders are placed correctly.
Is there some external data for this or is the model exporter doing something incorrectly here?

@miniwolf
Copy link
Author

So after digging for a while. I realized that the bounds_min and bounds_max contain information about how the collider should be set up in relation to the root object.
I will locally make changes to store the bounding volume's center and scale in the transform to get the information out from the .model file.

@miniwolf
Copy link
Author

miniwolf commented Mar 21, 2023

Here is my modified method for converting the bounding volume for non-meshed colliding children into the transform matrix.
https://gist.github.com/miniwolf/4eaee2cc20bf28605a894c1d49991959
The objects do not get a new mesh but the transform matrix will have the translation, scale, and rotation necessary to create a bounding box around it matching the one you would find in the game.

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

1 participant