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

Add option for bi-directional door swing (using rotation tween) #22

Conversation

grgp
Copy link
Contributor

@grgp grgp commented Jan 16, 2024

This adds the ability for doors that rotate using the Tween Parameters to open bi-directionally, depending on the position of the interactor (player). It also adds an example door in the demo scene, as you can see in the video.

Note that this PR's implementation is based on the existing open_rotation_deg and closed_rotation_deg, which seems to denote the global transform's rotation, not the local transform's.

image
screen-recording-2024-01-17-at-033009_QjA5fsoL.mp4

Also for reference, there was an issue here for bi-directional door animations. This PR is different because it doesn't use custom animations.

@grgp grgp force-pushed the bidirectional-door-swing-using-rotation-tween branch from be40d80 to 862aa8d Compare January 16, 2024 20:56
@Phazorknight
Copy link
Owner

Thank you! this looks super elegant codewise.

The door script has had some changes in the experimental branch, so I will try to properly review this today or tomorrow and then hopefully merge it in.

@Phazorknight Phazorknight merged commit 37166b4 into Phazorknight:main Jan 19, 2024
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.

2 participants