-
-
Notifications
You must be signed in to change notification settings - Fork 15
Fixed menu so it draws on top, various fixes/enhancements to stations #43
Fixed menu so it draws on top, various fixes/enhancements to stations #43
Conversation
…o-exit, character height now lowers when using a station to emulate sitting in a chair lowering ones head and vision.
There was a problem hiding this 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); |
There was a problem hiding this comment.
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.
…rouch/prone stances worked in chairs.
There was a problem hiding this 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_; |
There was a problem hiding this comment.
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.
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.