[Tool] Faster camera rotation 🔄 using keyboard or scroll wheel

Now use [Tool] GDAutocaster - play piano builds with ease, autocasting of skills, combos, faster / automatic camera, autohiding of items, centered Inquisitor Seal and more for all games! instead which has this feature merged into!


Gameplay:

Download link: https://ufile.io/fqpxky5d

I dislike rotating with mouse and with keyboard/scroll is painfully slow so I wrote a fix for that.
You can configure keys, the angle of rotation and suspend button.

[config]
Angle=45
Counterclockwise=q
Clockwise=e
RotationKey=k
SuspendKey=Insert
DefaultViewKey=r
Delay=30
  • Angle - in degrees, from 1 to 180

  • Counterclockwise - key (direction) you’d like to press (wheel) for counterclockwise rotation

  • Clockwise - key (direction) you’d like to press (wheel) for clockwise rotation

  • RotationKey - key that is bound to Rotate in Grim Dawn options

  • DefaultViewKey - key to return to starting angle/orientation/default view. If you want to set new default angle, turn off the program, set the camera as you wish with Grim Dawn Controls and turn on the program again.

  • SuspendKey - key you’d like to suspend the program with (if you i.e. want to write something in-game). It only works while in-game, you don’t need to use it after alt-tabbing since the program suspends automatically then.

  • Delay - depending on your computer and FPS. The higher FPS/more powerful computer, the lower the value should be. These values are adjusted to my laptop (40 fps in main campaign) so that the rotation doesn’t sometimes stop in the middle. If you have higher FPS, try lowering the Delay for smoother experience and less cursor flickering. The Delay is basically the number of milliseconds for various Sleeps in the code.

Depending on whether you are using keyboard or wheel, you may want to try different angles, i.e.

[config]
Angle=45
Counterclockwise=WheelDown
Clockwise=WheelUp
RotationKey=k
SuspendKey=Insert
DefaultViewKey=MButton
Delay=40

My current configuration is

[config]
Angle=60
Counterclockwise=*a
Clockwise=*d
RotationKey=k
SuspendKey=v
DefaultViewKey=t
Delay=30

60 degrees is a sweet spot between 45 and 90 degrees for me.
* - it enables the keys to rotate while holding ‘shift’ which I use to Force Stand

See also:
Automatic camera (following your character)

3 Likes

I shouldn’t have watched that video while eating a burrito.

Unfortunately from what I’ve read on our Discord and forums many people get dizzy from camera rotation. Not my case though, gonna rotate the shit out of Grim Dawn.

By the way, I updated the program a bit. It doesn’t work after alt-tabbing now + you can tweak it a little bit depending on your game fps/performance. PC Master race can try lowering the Performance parameter, laptop warriors as myself may need to increase it a little bit.

*new update - added key for returning to starting rotation (default view) and gameplay video

The link isn’t working anymore.
Could you please make a new one?

This is Dropbox issue, I had to contact the support because I can no longer share links.
For now I’ve put it here: https://ufile.io/fqpxky5d
I also share the code if you’d like to merge it with automatic camera code:

SendMode Input
#NoEnv
#SingleInstance Force
#MaxHotkeysPerInterval 1000 
#MaxThreadsPerHotkey 1
#KeyHistory 50
SetWorkingDir %A_ScriptDir%

hotkeys_turned_on := true
current_angle := 0

CalculateX(angle, width)
{
    return (Abs(angle) - angle) * width/360
}

Rotate(sleepTime, key, angle)
{
    global current_angle
    WinGetActiveStats, Title, Width, Height, X, Y
    MouseGetPos, xpos, ypos 
    BlockInput, MouseMove
    MouseMove, CalculateX(angle, Width), Height-1
    Sleep, %sleepTime%
    Send {%key% down}
    MouseMove, CalculateX(-angle, Width), Height-1
    BlockInput, MouseMoveOff
    Sleep, %sleepTime%
    Send {%key% up}
    MouseMove, xpos, ypos
    current_angle := Mod(current_angle + angle, 360)
}

If (!FileExist("gd_rotation.ini"))
{
    MsgBox, gd_rotation.ini not found
    ExitApp
}
else
{
    IniRead, angle, gd_rotation.ini, config, Angle, 45
    IniRead, counterclockwise, gd_rotation.ini, config, Counterclockwise, j
    IniRead, clockwise, gd_rotation.ini, config, Clockwise, l
    IniRead, key, gd_rotation.ini, config, RotationKey, k
    IniRead, suspendKey, gd_rotation.ini, config, SuspendKey, Insert
    IniRead, defaultViewKey, gd_rotation.ini, config, DefaultViewKey, r
    IniRead, sleepTime, gd_rotation.ini, config, Delay, 25
}

Hotkey, %counterclockwise%, Counterclock, On
Hotkey, %clockwise%, Clock, On
Hotkey, %suspendKey%, Susp, On
Hotkey, %defaultViewKey%, DefaultView, On

Loop
{
    Sleep, 1000
    if WinActive("Grim Dawn", , "Grim Dawn ")
    {
        if hotkeys_turned_on
            continue
    }
    else if !hotkeys_turned_on
        continue
    
    hotkeys_turned_on ^= true
    Suspend, Toggle
}

Counterclock:
    Rotate(sleepTime, key, angle)
Return

Clock:
    Rotate(sleepTime, key, -angle)
Return

Susp:
    Hotkey, %counterclockwise%, toggle
    Hotkey, %clockwise%, toggle
    Hotkey, %defaultViewKey%, toggle
Return

DefaultView:
    if current_angle > 180
        current_angle -= 360

    if current_angle < -180
        current_angle += 360
    
    Rotate(sleepTime, key, -current_angle)
Return

Thank you.

I merged it and tested different settings.
It works but it feels clunky together with the auto cam following because of the cursor behavior.
I think both scripts together just isn’t a good idea.

1 Like