-
Notifications
You must be signed in to change notification settings - Fork 79
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
Added support for different player "up" orientations. #305
Added support for different player "up" orientations. #305
Conversation
f631ca9
to
838185c
Compare
Absolutely love the idea but as I mentioned on Discord, not a fan of the approach. We're reinventing the wheel of the physics engine here and as a result we're only have parts of our own implementation playing by our own rules while other parts of the physics engine plays with it's rules. In order to create the behavior we're after in Godots build in physics engine you use area nodes that override the gravity within that area from the default, see space_override. Note that with We would still need to change our functions in similar ways but we're now getting our information from the same source the physics engine is getting it from resulting in objects that use the build in logic from behaving the same as our player. Ergo if you're at the bottom of your planet and you throw something, they don't fall off into space. |
49a49ea
to
79b489d
Compare
Updated the pull request to use physics gravity rather than orientation providers. The movement providers can now access both "up_player" and "up_gravity" information as appropriate for the motion. Movement providers can also perform a pre-processing step of changing the gravity - this is necessary for the wall-walking movement provider to have the player stick to the walls, while still supporting all other actions (running, jumping, etc). |
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.
Very cool addition, this is pretty cool
…ector. Added demo scene with ground-following movement provider to test the new up-vector logic. Added player orientation provider support to the XRToolsPlayerBody. Added ground and area orientation providers. Added path, point, and uniform orient areas to control the player orientation in different areas. Enhanced origin gravity demo to use orient areas to better handle player movement around the sphere and pill shapes. Removed experimental world-grab provider not intended for this PR Fixed climbing to work in the players orientation. Fixed flight to work in the players orientation. Fixed glide to work in the players orientation. Added sphere world demo. Removed orientation providers - orientation now comes from gravity as detected by the player body. Modified gravity demos to use standard Area nodes with space_override settings. Added movement_wall_walk to walk on walls of the specified physics layer. Further cleanup of orientation providers and unnecessary changes. Modified XRToolsPlayerBody to split "up" into "up_player" and "up_gravity" as both are needed in different circumstances. Added physics_pre_movement() method to movement providers to let them perform initial service actions such as messing with gravity. Modified wall_walk movement to check for walking walls, and to modify the gravity to point to them. Fixed gravity center for the sphere world demo.
79b489d
to
06c38be
Compare
This pull request allows for different "up" orientations for the player. The changes are:
Additionally the following cleanup was performed: