Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Fixed menu so it draws on top, various fixes/enhancements to stations #43

Merged
merged 3 commits into from
Jul 16, 2021
Merged

Fixed menu so it draws on top, various fixes/enhancements to stations #43

merged 3 commits into from
Jul 16, 2021

Conversation

evolvedant
Copy link
Contributor

Fixed the menu so it always draws on top.
Fixed stations to no longer auto-exit.
Added feature: Character height now lowers when using a station to emulate sitting in a chair lowering ones head and vision. The amount lowered is based on the average height loss for a humanoid which is about 55% height retained (or 45% lost). This can deviate slightly +/-5% depending on the age/height/sex of the human, but this seems like a good middle ground, especially since Avatars in VRC can be anything including generic non-humanoid, so we shouldn't need to be exact.

…o-exit, character height now lowers when using a station to emulate sitting in a chair lowering ones head and vision.
Copy link
Owner

@CyanLaser CyanLaser left a comment

Choose a reason for hiding this comment

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

Changes to menu rendering and setting current station look good.
As mentioned in the comment, could you remove modifying the enter location and instead look into updating the player's stance?

if (!station.IsMobile)
{
characterController_.enabled = false;
station.EnterLocation.Translate(0f, -SITTING_HEIGHT_ADJUSTMENT_, 0f);
Copy link
Owner

Choose a reason for hiding this comment

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

I'm concerned with moving the station's enter location directly. Since the enter location is just another transform, it could be moved through animation or other script and this has potential to mess that up. Could you change this to instead update the player's stance? This would move the camera up or down if they are in a station and not modify external objects.

Copy link
Owner

@CyanLaser CyanLaser left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you for fixing these bugs!

@@ -90,6 +92,7 @@ private enum Stance {
private CollisionFlags collisionFlags_;
private bool peviouslyGrounded_;
private bool legacyLocomotion_;
private bool updatePosition_;
Copy link
Owner

Choose a reason for hiding this comment

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

Now that this is in a global scope, I would have renamed this to give it more context, but I'm not going to go super nit here and force you to change things just for this.

@CyanLaser CyanLaser merged commit 2107d08 into CyanLaser:master Jul 16, 2021
@evolvedant evolvedant deleted the fix-menu-clipping-and-station-issues branch July 18, 2021 18:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants