Spectator camera 'smoothing'

radionautradionaut california Join Date: 2013-01-22 Member: 181192Members, Reinforced - Supporter, WC 2013 - Gold
moving around with wasd in overhead/freecam modes is jerky. i would like to propose that holding down the [crouch key] will gradually slow the cam down by x amount of speed.

Comments

  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited October 2014
    Shouldn't this already be possible? I mean there is a movie mode in there somewhere using dolly and smooth motion effects...
    film
    Hold crouch for dolly, movement modifier for speed or attack to orbit then press movement keys. Ready room player, cheats 1 or dev 1 must be true.
    http://wiki.unknownworlds.com/ns2/Console_Commands#Gameplay_and_Mapping
  • radionautradionaut california Join Date: 2013-01-22 Member: 181192Members, Reinforced - Supporter, WC 2013 - Gold
    right. but unfortunately it only works in freecam mode with cheats enabled, spits out tons of lua errors, and just feels clunky to use.
    i guess what i'm trying to describe is a simple key function that while held down, will decelerate the camera's wasd movement. something that works in vanilla (no cheats), and overhead/freecam spectator mode.
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    radionaut wrote: »
    right. but unfortunately it only works in freecam mode with cheats enabled, spits out tons of lua errors, and just feels clunky to use.
    i guess what i'm trying to describe is a simple key function that while held down, will decelerate the camera's wasd movement. something that works in vanilla (no cheats), and overhead/freecam spectator mode.

    cheats or doing command in the rr
  • CarNagE1CarNagE1 Poland Join Date: 2003-05-14 Member: 16298Members, NS2 Playtester, Reinforced - Shadow, WC 2013 - Supporter, Subnautica Playtester
    I making a teaser/trailer of ns2 i was recording live games on servers from spectator. I realy could use a nice "speed" command in console to slow my movement (only movement).
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    It also doesn't cause lua errors, film mode works exactly how you want it to
  • radionautradionaut california Join Date: 2013-01-22 Member: 181192Members, Reinforced - Supporter, WC 2013 - Gold
    ok so apparently the lua errors only occur in the sandbox if holding M1 while using wasd. i'm not really that familiar with the film command, so i went to test it out in a server's rr and was placed in spectate mode, dead. i then could not find a way to disable film mode. at any rate, it just doesn't seem like a very useful feature for shoutcasters and casual spectators alike.

    holding [Movement Special] in overhead spectate mode will effectively double (or more?) the camera speed..so i'm hoping that having a key that would do the opposite isn't too far out of the realm of possibility.
  • radionautradionaut california Join Date: 2013-01-22 Member: 181192Members, Reinforced - Supporter, WC 2013 - Gold
    edited October 2014
    i'm not much of a programmer, but really would like to have this functionality, so went digging into the lua files for the first time. after fumbling my way through launchpad and decoda, i tried adding a couple of (sloppily written) lines of code to core/lua/Mixins/OverheadMoveMixin.lua. it's kinda working the way i had imagined, but holding crouch and using wasd causes the camera jitter intermittently, as if it's tugging back in the opposite direction. any thoughts on this?

    here's the stanza i modified (lines 54-86, changes in bold)
    local function GetOverheadMove(self, input)
    
        local move = input.move
        
        if bit.band(input.commands, Move.ScrollForward) ~= 0 then
            move.z = 1
        end
        
        if bit.band(input.commands, Move.ScrollBackward) ~= 0 then
            move.z = -1
        end
        
        if bit.band(input.commands, Move.ScrollLeft) ~= 0 then
            move.x = 1
        end
        
        if bit.band(input.commands, Move.ScrollRight) ~= 0 then
            move.x = -1
        end
        
        if bit.band(input.commands, Move.MovementModifier) ~= 0 then
            speedModifierScalar = 2.5
        
        --start change
       elseif bit.band(input.commands, Move.Crouch) ~= 0 then
            speedModifierScalar = 0.3
        --end change
            
        else
            speedModifierScalar = 1
        end
        
        return move
        
    end
    

    Edit by Ghoul: put code into a code box so it looks nicer :P PS: try services like gists
Sign In or Register to comment.