Home Unreal Engine

UDK's idle camera bob/sway

polycounter lvl 14
Offline / Send Message
iansmithartist polycounter lvl 14
In the new versions of UDK a camera bob has been added whilst the player is standing idle, as if the camera is swaying as they breath.

Is there a way to disable it?

After much googling iv'e discovered (link) that alternative game types don't have the sway/bob but unfortunately they also alter the height of the players camera, and because I have already done alot of modelling and block out to suit the scale of the default camera height, resizing everything would simply be impractical.

Other potential solutions iv'e (link) found include changing values in certain .uc or .ini files but haven't got it to work. My understanding of unrealscript is nil so I could be missing something simple?

I've spent the better part of today trying to figure it out or hunt down a solution but so far im out of luck, anyone able to give me a clue?

Replies

  • blankslatejoe
    Options
    Offline / Send Message
    blankslatejoe polycounter lvl 18
    Hm... try opening UTPlayerController.uc (in development/src/UTGAME/classes...ithink?) and, under the very bottom there's a section called 'defaultproperties'. between the curlybrackets that follow it, try adding the line:
    TimeBetweenCameraBreathChanges = 9999.0

    You might have to change the read-only flag on the file to save it, I'm not sure. The next time you run the editor or game, say yes to the 'rebuild scripts?' prompt. Should take 10-20 seconds to build scripts. Assuming you see no red or yellow error lines, you'll be good to go (launch the game again once scripts are done and check to see if it works!)

    I'm not sure how to disable that setting entirely without overriding the function in a new subclass (which involves you setting up UDK for custom scripting), but that change should at least make it only do the sway once every 2.5 hours or so of gameplay (once every 9999 seconds). You can maybe get away with an even higher number than 9999, but the variable might have a limit around 64,000 seconds or so (tinker and see--but make a copy of the unchanged playercontroller.uc file first---and call it utplayercontrollerBACKUP.TXT (not .uc) or something so the compiler ignores it)

    goodluck!
  • iansmithartist
    Options
    Offline / Send Message
    iansmithartist polycounter lvl 14
    You Sir are a gentlemen and a scholar!

    While your suggestion did work out right I quickly figured it out.

    Placing "TimeBetweenCameraBreathChanges = 9999.0" in UTPlayerController.uc produces an error when compiling. But I googled the function and found its listed in the defaultpropeties in SimplePc.uc. Its default as 2.0 so I changed it to 9999.0 like you suggested, recompiled and it worked a charm!

    Further more after searching a little further I was able to disable the walking "bob" by changing line 78 of SimplePawn.uc from "bAllowBob = true;" to "false."

    Thanks for your help, and I hope someone else finds this useful too because its taken me the best part of a day to figure it out!
Sign In or Register to comment.