-
Notifications
You must be signed in to change notification settings - Fork 312
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
Box Shape for the Dynamic Origin behavior on the On-Screen Stick. #1654
base: develop
Are you sure you want to change the base?
Conversation
Circle gizmo only drawn when selected
Since this is my first contribution to any GitHub repo ever, I'm not 100% sure of a lot of this stuff. Sorry, not sure what I need to do, or if it's just too early still. I'd definitely like to get feedback at some point, and maybe at some point have it get merged. |
Hi @harry1o7 , thank you for your contribution.
We are a small team so I cannot say for sure. We are now trying to look at some of the pull requests created by external contributors once every month. But this doesn't necessarily mean that yours will be reviewed by then.
You don't need to run the Yamato tests. These will be run internally by us.
For now, you don't need to do anything. Just wait for our review. In the meanwhile, if you need these changes in the package, just use the forked repository where you introduced the changes. |
Description
This change affects the dynamic origin system for the on-screen stick.
The dynamic origin joystick is intended for mobile use, and in most games that use it (think Rocket League: Sideswipe, or Minecraft), the area of its use is on the left side of the screen.
However, in the current version, the stick can only use a circle as a dynamic origin area.
Now, users can use a RectTransform component on a GameObject to perfectly match half the screen, as well as any other box users want.
An added benefit is the fact that RectTransforms can be anchored and resized according to the window size.
Changes made
On Screen Stick component options changed to accommodate the extra feature.
You can place a RectTransform into the Origin Transform component field to use a box shaped area.
Notes
No gizmo for the shape of the RectTransform yet. However, clicking on the GameObject that holds the RectTransform will show a gizmo anyway.
The circle dynamic origin shape (the original one) does not update to accommodate for changing window sides. This is an issue because mobile devices are some of the most variable device proportions.