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

fix static doors collider size #1673

Merged
merged 1 commit into from Jan 26, 2020

Conversation

petchema
Copy link
Collaborator

@petchema petchema commented Jan 24, 2020

In addition to using the max of width and depth as door thickness, swap Y and Z if Y size is less than Z size.

It seems to work fine (more testing welcome though), but I suspect the logic is not perfectly correct; I suspect Y and Z actually need to be swapped for grounded doors because you're actually entering by its top. As if door dimensions were considered after rotations instead of before; They're really its X, Y and Z sizes, and not local width, height and depth. Or something like that.
(and that could explain why width and depth can switch roles, probably depending on door orientation).

Forums: https://forums.dfworkshop.net/viewtopic.php?f=24&t=566

In addition to using the max of width and depth as door thickness, swap
Y and Z if Y size is less than Z size.

It seems to work fine, but I suspect the logic is not perfectly correct;
I suspect Y and Z actually need to be swapped for grounded doors because
you're actually entering by its top. As if door dimensions were
considered _after_ rotations instead of before, or something like that.
(and that could explain why width and depth can switch roles).
@Interkarma
Copy link
Owner

Thank you for this, a nice refinement. :)

In the case of the door laying along ground, virtual collider is slightly larger than target model. But I'm not concerned about getting it perfect. Player still needs to click on collidable geometry inside the virtual collider area. Provided the sizes remain reasonable around the door area, it won't present much problem in practice. These volumes aren't used for physics simulation or anything.

@Interkarma Interkarma merged commit d8f6592 into Interkarma:master Jan 26, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants