-
Notifications
You must be signed in to change notification settings - Fork 78
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
Refactor player height adjustment #475
Refactor player height adjustment #475
Conversation
My implementation of seat(newest one) disables playerbody and every frame sets transform origin to seat point+ adds rotation, all on xr origin. #462 |
Also what effect would it have on #463 ? |
hmm, gotta check this out then |
@pietru2004 sorry I still need to look into your seated solution. It's indeed a bit of a conundrum, player body doesn't work for the situation where the game character is sitting so disabling it is the correct way forward, or possibly this should be a mode. @DigitalN8m4r3 this PR is the opposite, this is the scenario where your game character is standing up regardless of the end user (player) being seated or standing. When you look at the scenario where the game character is seated, the game dynamics change drastically from what playerbody is designed for. Controller inputs now no longer effect the game character, say your game character is seated in a car, controller inputs will effect the car, it's the car that now moves, and the game character as a child node moves with the car. The problem is anchoring your game character so they are seated in the correct position at the start. For a game that only allows a seated position this is easy, you place the XROrigin where you want the players head to be and you wait until tracking information is stable and call For a game where you want to be able to switch between a seated and standing position, say you want to make a VR version of GTA, you'll need to implement your own version of what The mistake I see many people make is to try and keep the head in place once the game character is seated and basically turn the game into a 3DOF game. You really really don't want this. When I'm in a car, I want to be able to move my head and look around, this also means moving your head positionally. If you disable this, not only do you induce motion sickness, you also hinder the player from making use of their natural ability to change the angle at which they are looking at something. This however opens the door to the player moving beyond the space that they can naturally occupy. While hilarious the player can physically stand up and walk away, moving the players head outside of the vehicle. The best way to handle this situation IMHO is by checking if the head moves out of the acceptable space and fade the screen to black (maybe with a message to press the reset button). |
What about crouching in real life, mayby game does not use crouch function... |
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.
This looks good - just need to resolve the merge conflicts.
b1bcf86
to
3f2bba1
Compare
This PR redoes the player height implementation.
Our default setting in project settings remains however our user settings now store a user overridden version of this.
As our loading screen has the "trigger to continue" logic we can assume the player is standing (or sitting) in "rest" and we calculate the offset required to make the virtual player the height stored in our settings.
This means XR tools can now be played while seated but controlling the character as if standing up.
Note that this is different from @pietru2004 PRs where we actually want the character to be seated (in a vehicle or otherwise) if I understand correctly. This is something we do want to support properly but I haven't had time to look into this properly.