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

Improve snap turning logic #229

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

BastiaanOlij
Copy link
Member

@BastiaanOlij BastiaanOlij commented Oct 26, 2022

Add defaults in Project Settings

Added a snap deadzone and default snap turning settings to our project settings:

image

Add user settings system to save user preference

Added a user settings class that saves user settings to user://xtools_user_settings.json

There is also a default UI class that allows developers to just embed the scene into something of their choosing:
image

In our demo application we nicely integrate this UI on a pedestal:
image

But similarly we could embed access to this UI in game. We may add a demo for this where the UI can be access on the players wrist or something like that. That's for another day though.

By default have turn movement adhere to user/system settings

Our MovementTurn class now has a new turn mode setting that replaces the smooth tickbox:
image

This can be:

  • Default, we will check the user settings for this (which defaults to our project settings)
  • Snap, which sets this to snap turning regardless of our user setting
  • Smooth, which sets this to smooth turning regardless of our user setting

Add user setting for player height adjustment

I also added a height adjust user setting:

image

This simply increases/decreases the player height calculated in the PlayerBody node. This allows you to play games designed for standing up while being seated, or if you're a small/tall person adjust your in game size to make the experience more comfortable.

edit I also added a project setting "player standard height". This setting allows the developer to set the height of the player they are designing the game for.
There is now a button on the user settings UI that takes the current height of the player based on the camera position, compares it to the "standard height" and calculates an adjustment value that makes the player the "standard" height.

- Add defaults in Project Settings
- Add user settings system to save user preference
- By default have turn movement adhere to user/system settings
- Add user setting for player height adjustment
Copy link
Collaborator

@Malcolmnixon Malcolmnixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works very nicely. I'm quite happy with the ability to extend the project settings window.

@BastiaanOlij BastiaanOlij merged commit c32013c into GodotVR:master Oct 26, 2022
@BastiaanOlij BastiaanOlij deleted the improve_snap_turning branch October 26, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants