Jump to content

Enhanced Camera Free Look


Recommended Posts

I have, and really enjoy, Enhanced First Person Camera with Camera Commands. I also use Enable Free Look OBSE. I only have 2 issues with the latter, none with the first. The issues are that your body goes invisible, and after using free look, the next time you use it, you're looking exactly where you left it.  I've been trying to get enable free look obse to use camera commands so it might show the body (first task) and then reset to the default position (which I figure the CameraReset command will help alot). After about 30 hours of messing with the script and reading about Camera Commands, I'm stumped.


If I press the view change button, I get this when it's released.



Here's the script as I have changed it.



scriptname EnhancedCameraFreeLook
float   fQuestDelayTime
short   doOnceSetQuestDelay
short   doOnceGetToggleKey
short   doOnceDisplayMessage
long    MouseDirectXScanCode
float   TogglePOVKey
short   ToggleKey
short   show
float   origVanityModeWheelMin
float   origVanityModeWheelMax
float   pIx
float   pIy
float   pIz
float   pIzscale
float   pNose
begin GameMode
    ; This code requires the Oblivion Script Extender (OBSE).
    ; It was developed on 0009a but may work on lower versions.
    ; By default, when in first person, the game waits 0.5 seconds
    ; before switching to vanity camera mode when the middle mouse
    ; button is pressed. Since this quest only runs every 0.6 seconds,
    ; there was a chance that the camera would switch to vanity mode
    ; before I could make you see through. Therefore, I increased the
    ; switch to vanity mode delay to be greater than the quest run
    ; interval. This should guarantee that this code exectues before
    ; the camera switches modes.
    ; ECFL is a global variable that determines whether or not to
    ; prompt the user for the toggle key.
    ; Until the toggle key has been assigned, make this script run
    ; every 0.01 secs. This should prevent other mods that pop up
    ; their own messageboxes (on startup) from stealing my input
    ; and should prevent the interleaving of our messageboxes.
    if ( EFL == 0 )
        set fQuestDelayTime to 0.01
        ; get the Direct X scan code of the key assigned to the
        ; 'Change View' functionaltiy
        set TogglePOVKey to GetControl 14
        ; save the original values for these two game play settings
        ; so we can restore them later
        set origVanityModeWheelMin to GetGameSetting fVanityModeWheelMin
        set origVanityModeWheelMax to GetGameSetting fVanityModeWheelMax
        set doOnceGetToggleKey to 0
        set doOnceDisplayMessage to 0
        ; make sure this code doesn't run again until the user uses
        ; the console to 'set efl to 0' again.
        set pIx to player.GetPos x
        set pIy to player.GetPos y
        set pIz to player.GetPos z 
        ; figure height
        set pIzscale to player.getScale ; get player height
        set pIzscale to ( pIzscale * ( 115 - ( player.IsSneaking * 20 ) ) )
        set pIz to pIz + pIzscale
        set pNose to 20.00
        ;figure offset for front face
        set pIy to pNose
        set pIx to 0
        set EFL to 1
    if ( doOnceGetToggleKey == 0 )
        if ( doOnceDisplayMessage == 0 )
            ; wait to for the user to not be pressing a key before
            ; putting up the messagebox.
            if ( GetNumKeysPressed > 0 )
            Messagebox "Enhanced Camera FreeLook changes the functionality of the vanity camera.                                                                You need to assign a key, that when held down, will force the vanity camera to act like it did when the game shipped.                                                                                                       Please hold down the key that you would like to assign to this function  and click the Done button."
            set doOnceDisplayMessage to 1
            ; only accept their choice of key if it was the only key
            ; pressed when they clicked Done, otheriwse put the
            ; messagebox up again.
            if ( GetNumKeysPressed == 1)
                set ToggleKey to GetKeyPress 0
                MessageBox "Your vanity mode toggle key has been set. You can release the key.                                                                                If you decide you want to run this configuration step again, open the console and type 'set efl to 0'."
                ; now that they have set their toggle key, change the
                ; script to run in a more reasonable every 0.6 seconds
                ; from here on out. make sure the switch to vanity mode
                ; delay is greater than the quest run delay.
                set fQuestDelayTime to 0.6
                con_SetGameSetting fVanityModeDelay 0.7
                set doOnceGetToggleKey to 1
                set doOnceDisplayMessage to 0
    ; find out which mouse button is pressed
    set MouseDirectXScanCode to GetMouseButtonPress 0
    ; scan codes for a right handed mouse setup are:
    ; 256             Left Button
    ; 257             Right Button
    ; 258             Scroll Wheel (Center Button)
    ; 65535 or -1     No Buttons Pressed
    ; assume we want to 'show' you by default
    set show to 1
    ; if either the middle mouse button or the 'Change View' key is
    ; pressed then we don't want to 'show' you.
    if ( isKeyPressed2 TogglePOVKey || MouseDirectXScanCode == 258 )
        set show to 0
    ; unless of course, the toggle key is pressed, then we do want
    ; to 'show' you.
    if ( isKeyPressed2 ToggleKey)
        set show to 1
    if (show)
        ; restore the camera to the positions we saved and make
        ; you not see-through
        SetNumericGameSetting fVanityModeWheelMin origVanityModeWheelMin
        SetNumericGameSetting fVanityModeWheelMax origVanityModeWheelMax
        ;player.setactoralpha 1
        ; put the camera inside your body and make you see-through
        ;player.setactoralpha 0
        con_SetGameSetting fVanityModeWheelMin 1
        con_SetGameSetting fVanityModeWheelMax 1
        CameraMove pIx pIy pIz 




Green = added

Red = Commented out


Added info comes from here, post 9.


color changes don't apply in spoiler tags....


Edit: Adding the CameraReset stopped the issue from the picture

Link to comment

Well, after nearly 40 hrs of work/research, I have come to the conclusion that this is currently not possible. Perhaps if vanity camera can be added to camera commands, but for now, due to the limited settings for the vanity camera, it shall not be. 


The vanity camera, when set to inside the pc, is about chest height, as it has no set z function. I did alter a few settings in the for look esp, so looking side to side is more natural. That can be found here. It's all that's needed, it's the OBSE version. Other than the body disappearing and the camera staying where it was when you let the free look button go, it works perfectly fine with enhanced camera. The slower turning rate makes it easier to remember to look forward before releasing the button. More natural = better immersion. Enjoy. :)  This also removes the need for a vanity camera smoother mod.

Link to comment


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...