Jump to content

Camera Rotation


nextidea

Recommended Posts

I'm trying to find a way to replicate the Free Camera Rotation feature that was in XCOM ToolBoks (which no longer works in the newest EW update). I believe this involves both enabling the camera to rotate continuously and changing the rotation angle increment. Does anyone know which files modify these values?
Link to comment
Share on other sites

I'm trying to find a way to replicate the Free Camera Rotation feature that was in XCOM ToolBoks (which no longer works in the newest EW update). I believe this involves both enabling the camera to rotate continuously and changing the rotation angle increment. Does anyone know which files modify these values?

Both of the mods give some functionally (still suck in my opinion) to a free camera but not as good as ToolBoks or the other free camera.

 

 

Wizardesssss

Link to comment
Share on other sites

still suck in my opinion

People, who criticize without working, suck more in my opinion.

 

So, I finally took time to install TB and examine it's "free rotation" feature. For some reason my mind remembered is as "free camera" feature. :smile: Turned out, it simply switches Q and E functionality from "rotate when released" to "rotate while pressed". So I took a liberty to re-implement it for never EU and EW versions. Anyone, who's interested, can grab it at XCOM Camera Tweaks files section. :smile:

Link to comment
Share on other sites

  • 1 month later...

 

So, I finally took time to install TB and examine it's "free rotation" feature. For some reason my mind remembered is as "free camera" feature. :smile: Turned out, it simply switches Q and E functionality from "rotate when released" to "rotate while pressed". So I took a liberty to re-implement it for never EU and EW versions. Anyone, who's interested, can grab it at XCOM Camera Tweaks files section. :smile:

 

 

Hi wghost81, very grateful for your work on reimplementing most of the features from TB.

There is one functionality that appears to be missing however, namely the ability to stop the camera from resetting the zoom level when jumping from soldier to soldier? This drives me nuts and started my quest for modding tools etc. Cannot believe this is not an option in-game.

 

Is this something you might consider implementing in a separate mod? Or would you please be able to point me in the direction of the correct .ini file / variable to amend?

Link to comment
Share on other sites

farfrael, use default zoom level mod to set it to the value you like. It's better solution, IMO.

 

thank you, I have done that, it is better but still not ideal ... is there no way to disable the camera reset that you are aware of?

Link to comment
Share on other sites

Just FYI, I'm working on a mod that will (in my opinion, anyhow) improve the mouse camera controls in XCOM.

 

So far what I have working :

- Click and drag with LMouse pans the screen around, similar to using "WASD"

 

Next goals :

- Switch middle mouse button to change yaw/pitch of camera instead of zoom

- Switch mousewheel to control zoom instead of elevation

- Switch Q and E keys to control elevation instead of fixed yaw rotations

 

Any feedback as to whether these controls would be more natural for mouse/keyboard?

Link to comment
Share on other sites

So, some success.

 

I was able to get the middle mouse button to allow free yaw of the camera (hold middle button and move mouse left/right provides free yaw camera rotation). However the similar command to provide free pitch control via mouse up/down didn't work.

 

In XComCamera.Mouse_CheckForZoom I changed :

    if(vPres.GetHUD().IsMouseActive() && !vPres.m_kUIMouseCursor.bIsInDefaultLocation)
    {
        vPres.ZoomCameraScroll(true, m_vMouseCursorDelta.Y * 0.010);
    }

to:

    if(vPres.GetHUD().IsMouseActive() && !vPres.m_kUIMouseCursor.bIsInDefaultLocation)
    {
        XComCamera(Outer.PlayerCamera).YawCamera(m_vMouseCursorDelta.X * -2.0);
        XComCamera(Outer.PlayerCamera).PitchCamera(m_vMouseCursorDelta.Y * 2.0);
    }

Basically replacing the vanilla middle mouse button click/drag zoom functionality with yaw and pitch commands. Both functions exist and are implemented in XComCamera, but only the yaw functionality is working.

 

I've verified that both the X and Y values are valid, as the change to allow free-dragging via LMouse works, looking like :

XComCamera(Outer.PlayerCamera).UpdateTurnAndLookUp(m_vMouseCursorDelta.X * -2.0, m_vMouseCursorDelta.Y * 2.0);

works correctly.

 

After some more experimenting I discovered that the XGCameraView.AddPitch command works, although AddPitch didn't clamp the pitch to -90º to 0 degrees.

 

The free yaw/pitch commands that I ended up implementing (which use the EdgeScrollRate profile setting) are :

    if(vPres.GetHUD().IsMouseActive() && !vPres.m_kUIMouseCursor.bIsInDefaultLocation)
    {
        XComCamera(Outer.PlayerCamera).YawCamera((-1.0 * m_vMouseCursorDelta.X) * XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.ProfileSettingsEdgeScrollRate());
        vPres.CAMGetCurrentView().AddPitch((1.0 * m_vMouseCursorDelta.Y) * XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.ProfileSettingsEdgeScrollRate());
    }

Still a few more things to do. The above broke the zoom control, which I still need to map to the scroll wheel. And then setting the default mapping for the up/down elevation to the Q and E keys, replacing the old keyboard-based fixed increment yaw controls.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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