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

Openvr Standing/Roomscale #1

Merged
merged 21 commits into from
Nov 7, 2016
Merged

Openvr Standing/Roomscale #1

merged 21 commits into from
Nov 7, 2016

Commits on Nov 3, 2016

  1. Initial commit for standing mode

    A lot of unpolished hacking, so I put it into a branch to be
    fixed/completed and cleaned up.
    
    Input should obviously not be in win_input.cpp, need to learn more about
    UI input versus game input.
    
    Basically weapons are recentered on tracked controllers. Several weapons
    can fire but several need work (chainsaw, grenade, bfg, soul cube).
    
    Hands are still visible, so it kind of looks funny for now.
    
    Movement can be done by walking around (roomscale vr!) and you can bump
    into walls rather then penetrate.
    
    Ducking low enough also puts you in crouch mode and allows you to walk
    in to vents, and small compartments.
    
    Button mapping may change.
    Codes4Fun committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    df296c9 View commit details
    Browse the repository at this point in the history
  2. Disable Weapon Fire Feedback

    This too jarring in VR. In the future I may re-enable it but reduce the
    effect.
    Codes4Fun committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    7584007 View commit details
    Browse the repository at this point in the history
  3. Attach flashlight to head

    The old code depended on seated position to estimate body position, this
    doesn't work in standing mode.
    
    The flashlight may be changed to be in the left hand controller.
    Codes4Fun committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    f05bbb2 View commit details
    Browse the repository at this point in the history
  4. Chainsaw and Grenades

    Attempt at fixing the chainsaw and grenades. Grenades work better but
    not by much.
    
    I will attempt another solution for grenades, fists, and the soul cube.
    Codes4Fun committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    5ce00aa View commit details
    Browse the repository at this point in the history
  5. Cleanup of origin/axis of hmd and controllers.

    Slight refactor, looking at how variables are used, reduced some
    repeated calculations, some further improvements could be made.
    Codes4Fun committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    01dd0b9 View commit details
    Browse the repository at this point in the history
  6. Improved fists, grenade, soul cube.

    I think this is a good solution for the soul cube, fists, and grenades
    for now. Some more interesting things could be done for grenades (like
    actually using the motion controller to toss them), and fists (actually
    using motion controllers to punch), but this is a good interim solution.
    Codes4Fun committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    a78d8ca View commit details
    Browse the repository at this point in the history
  7. Fix for BFG and refactor.

    The first frame of the BFG fire animation was causing the projectile to
    always fire more upward (the animation pitches the weapon to represent
    kickback). To fix this I consolidated the muzzle getting code (also used
    for laserpointer), and just use the muzzle from the frame before the
    animation, that does not yet have the kickback. This really seems like
    an animation bug (either in the asset or in the pipeline or maybe in the
    animation system), the first frame maybe should not have the kickback in
    it already, but in either case the code fix works and maybe is the best
    way to do it since it gets rid of the redudant calls of getting the
    muzzle position but at the same time creates a depedency risk (the
    muzzle should be updated first before using it).
    Codes4Fun committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    d7367ff View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2016

  1. Graphical bug fix when controllers not yet available.

    Weird geometry when the controllers are not yet returning data, needed
    to set controllers to false.
    Codes4Fun committed Nov 4, 2016
    Configuration menu
    Copy the full SHA
    92de9c1 View commit details
    Browse the repository at this point in the history
  2. Added a skin wrapper for VR.

    This is a little hacky. Basically a skin that removes the arms from the
    weapons, but wraps other skins (like the invisible skins).
    
    Would be less hacky if I acquired the materials early on during level
    loading (it throws an exception if you try to load a material from the
    game thread), and would be less hacky if it wasn't done as global but as
    a member variable of idWeapon.
    Codes4Fun committed Nov 4, 2016
    Configuration menu
    Copy the full SHA
    c8141ef View commit details
    Browse the repository at this point in the history
  3. Fixed save game crashing.

    This was caused by the new skin wrapping stuff.
    Codes4Fun committed Nov 4, 2016
    Configuration menu
    Copy the full SHA
    ea8fe24 View commit details
    Browse the repository at this point in the history
  4. Disable Angle Tilting and double vision.

    It's disturbing in VR. The velocity kickback is okay though.
    Codes4Fun committed Nov 4, 2016
    Configuration menu
    Copy the full SHA
    005b8c6 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2016

  1. Control Changes

    Swapped jump and reload buttons, it felt more natural to reload with
    your gun hand (right hand) and to jump with you navigation hand (left
    hand). Might try swapping the jump and flashlight button, if it seems
    kind of tough to jump that way on various controllers.
    
    Navigating now moves in the direction of the facing of your left hand
    controller.
    Codes4Fun committed Nov 5, 2016
    Configuration menu
    Copy the full SHA
    0153b84 View commit details
    Browse the repository at this point in the history
  2. Minor Mouse Fix

    Basically fixes scaling of the mouse to the screen, which doesn't work
    well in windowed mode and VR. Found while learning more about inputs to
    do a refactor.
    Codes4Fun committed Nov 5, 2016
    Configuration menu
    Copy the full SHA
    073679f View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2016

  1. Input Refactor

    I think this is the more ideal way input should be done in this engine,
    through user commands. This also may allow for multiplayer in the
    future, but latency will be a huge deal, there could also be latency
    issues with doing it this way since the game thread runs 50% faster than
    the render thread.
    
    I needed a conceptual direction of the body, so I chose the left
    controller, it makes sense since it also controls the bodies locomotion.
    This allows players to move in the direction they are facing, both
    physically and with the controller.
    
    More tweaks and bug may need to be done.
    Codes4Fun committed Nov 6, 2016
    Configuration menu
    Copy the full SHA
    c241eb1 View commit details
    Browse the repository at this point in the history
  2. Input Refactor 2

    Something I forgot to include in the last changeset!
    
    Basically the last changeset was to remove some hacks, and this was one
    of them!
    Codes4Fun committed Nov 6, 2016
    Configuration menu
    Copy the full SHA
    5a025ba View commit details
    Browse the repository at this point in the history
  3. Input Refactor 3

    Minor change to get rid of using global variables.
    Codes4Fun committed Nov 6, 2016
    Configuration menu
    Copy the full SHA
    cb3f053 View commit details
    Browse the repository at this point in the history
  4. Flashlight and Control Changes

    Flashlight controlled by the left hand!
    
    Swapped jump button and flashlight button. jump is now trigger,
    flashlight is now touch/stick button (which feels more like a
    flashlight).
    
    Note: at some point need to optimize all the recentering code and static
    variables for weapons and the flashlight.
    Codes4Fun committed Nov 6, 2016
    Configuration menu
    Copy the full SHA
    37e6e77 View commit details
    Browse the repository at this point in the history
  5. Skin Refactor

    Made things less hacky by moving VR skin code closer to where it likely
    belongs.
    Codes4Fun committed Nov 6, 2016
    Configuration menu
    Copy the full SHA
    b4d02af View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2016

  1. Fix for Cinematics

    Not an ideal fix because you lose head position tracking (back to DK1
    days).
    Codes4Fun committed Nov 7, 2016
    Configuration menu
    Copy the full SHA
    b59fa82 View commit details
    Browse the repository at this point in the history
  2. Fix for Cinematics 2

    When moving the left controller it also updates the head position and
    viewAngles, but this isn't usually noticed because viewAngles and the
    head cancel each other out, but with cinematics viewAngles variable is
    not used, so I now have it that viewAngles can be used in cinematics
    (you can use the joystick/mouse to rotate the view).
    Codes4Fun committed Nov 7, 2016
    Configuration menu
    Copy the full SHA
    e33c6c8 View commit details
    Browse the repository at this point in the history
  3. Fix for Cinematics 3

    Hopefully the final fix. The same issue with the left controller causing
    weird headmovements can occur when the pitch is not zero, so we remove
    the pitch before mixing it with the cinematic camera. Also decided to
    pull the changes out of the camera function and simply take the camera
    functions output and apply against our axis matrix.
    Codes4Fun committed Nov 7, 2016
    Configuration menu
    Copy the full SHA
    f8c1cf6 View commit details
    Browse the repository at this point in the history