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

Box Shape for the Dynamic Origin behavior on the On-Screen Stick. #1654

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

harry1o7
Copy link

@harry1o7 harry1o7 commented Mar 5, 2023

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.
Left Side Joystick Area

However, in the current version, the stick can only use a circle as a dynamic origin area.

Circle joystick origin

Now, users can use a RectTransform component on a GameObject to perfectly match half the screen, as well as any other box users want.
half-screen-box

An added benefit is the fact that RectTransforms can be anchored and resized according to the window size.
Vertical Aspect Ratio Example

Changes made

On Screen Stick component options changed to accommodate the extra feature.
Component Menu

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.

@unity-cla-assistant
Copy link

unity-cla-assistant commented Mar 5, 2023

CLA assistant check
All committers have signed the CLA.

@jfreire-unity jfreire-unity added the waiting-for-review The issue is scheduled to be reviewed by the Unity maintainers label Mar 7, 2023
@harry1o7
Copy link
Author

Since this is my first contribution to any GitHub repo ever, I'm not 100% sure of a lot of this stuff.
At what point can this get reviewed? Do I have to run these Yamato tests, or are they automatic?
Is this PR even eligible to get reviews yet? Are the build tests supposed to take weeks, or are they running at all?

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.

@jfreire-unity
Copy link
Collaborator

jfreire-unity commented Mar 13, 2023

Hi @harry1o7 , thank you for your contribution.

At what point can this get reviewed?

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.

Do I have to run these Yamato tests or are they automatic?
Is this PR even eligible to get reviews yet? Are the build tests supposed to take weeks, or are they running at all?

You don't need to run the Yamato tests. These will be run internally by us.
The PR is eligible for review the moment is created. The Yamato tests don't run for contributors, only for our internal team.

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-review The issue is scheduled to be reviewed by the Unity maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants