Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > Technical threads > Controls threads

Controls threads Everything about controls in CoD

Reply
 
Thread Tools Display Modes
  #11  
Old 04-24-2011, 04:47 PM
lelek lelek is offline
Registered Member
 
Join Date: May 2008
Posts: 6
Thumbs up

Ok. I've managed to work out something that works for me.
I'm using this little GlovePIE script:

PIE.FrameRate = 108 Hz
if Pressed(q) then
if var.a=1 then
var.a=0
Release(Mouse.MiddleButton)
Else
var.a=1
Key.End = True
Key.End = False
endif
endif

if var.a=1 then
Mouse.MiddleButton = True
Mouse.DirectInputY = RealTrackIR.z * 6
endif

For this to work you have to map middle mouse button to "Hold to adjust FOV" setting within CoD, and put z-axis sensitivity in FreeTrack to minimum (this basicaly swiches off back and forth movement in cockpit). (For some reason FakeTrackIR.z = 0 didn't work. This is a workaround).

How it works is when you press the "q" button z-axis will controll FOV but you won't be able to use the mouse until you press "q" again to regain control of the mouse and that's about it.
You can play with the number - (* 6) to adjust sensitivity or change the buttons if you want.

Last edited by lelek; 04-24-2011 at 04:54 PM.
Reply With Quote
  #12  
Old 04-25-2011, 12:15 AM
MadBlaster MadBlaster is offline
Approved Member
 
Join Date: Oct 2010
Posts: 666
Default

Right on guy I guess you have 3 point cap? I'm only single point, so no Z axis data. Anyway, it's good to see another guy figure it out. We will conquer CLOD in short order.
Reply With Quote
  #13  
Old 05-04-2011, 08:52 PM
lelek lelek is offline
Registered Member
 
Join Date: May 2008
Posts: 6
Thumbs up The ultimate view control

It's me again and I’ve got a new script!
I know no one really cares, but I think it’s brilliant and just need to share with the World. Anyway, I’ll need to break this up a bit for clarity.

What it does:
1. Press space and your center view will shift to the right to line up with the gun sight. Press space again and you’re back to center view. In my opinion this completely resolves issues with German gun sights some people were complaining about.
2. I’m kind of a lazy guy, so when being chased by an opposing fighter (which is most of the time) it’s a bit of a hassle for me to look behind AND lean to the side in order to see around the back seat. That’s why I’ve made the script do the leaning for me while looking towards the back of the plane. And this is done almost imperceptibly I might add.
3. By pressing the middle mouse button you can switch to FOV mode. In this mode you control smooth FOV adjustments with z-axis movement of Freetrack/TIR devices. Actually z-axis movements move your in game head back and forth AND adjust FOV simultaneously. And you can modify the amount at witch one happens over the other (ratio of head movements over FOV adjustment) to suit your preferences. Press the middle mouse button again to regain control of the mouse and click on switches.

How to set it up:
1. Within Il-2 Cliffs of Dover go to Options – Controls – Camera and set “Hold to Adjust Field of View” to “Mouse Middle” and in Aircraft unbind “Space” which is bound by default to “Fire Guns (Machine Guns)”
2. In Freetrack uncheck all of the “View relative translations” check boxes in Profile – Advanced or if you’re using TIR – switch off TrueView. The script already incorporates view relative translations so leaving these options on would produce unpredictable results.
3. Download and install GlovePIE (don’t know the site. Just Google it, you shouldn’t have trouble finding it – it’s free).
4. Run your head tracking software before launching GlovePIE, copy and paste the following script into GlovePIE and press “Run”. After that launch Cliffs of Dover.

PIE.FrameRate = 120 Hz
If Released(Mouse.MiddleButton) then
If var.a = 1 then
var.a = 0
Else
var.a = 1
Key.End = True
Key.End = False
Endif
Endif

If Pressed(Space) then
If var.b = 1 then
var.b = 0
var.xx = 0
Else
var.b = 1
var.xx = 0.02
Endif
Endif

if var.a = 1 then
Mouse.MiddleButton = True
Mouse.DirectInputY = RealTrackIR.z * 0.6
EndIf

var.k = 0.08
If RealTrackIR.yaw > 90 Then
var.x = (- sin(RealTrackIR.yaw) + 1) * (var.k - var.xx)
ElseIf RealTrackIR.yaw < -90 Then
var.x = (- sin(RealTrackIR.yaw) - 1) * (var.k + var.xx)
Else
var.x = 0
EndIf

FakeTrackIR.x = var.xx + var.x + (RealTrackIR.x * cos(RealTrackIR.yaw) * cos(RealTrackIR.roll) + RealTrackIR.y * (-1 * cos(RealTrackIR.pitch) * sin(RealTrackIR.roll) + sin(RealTrackIR.pitch) * sin(RealTrackIR.yaw) * cos(RealTrackIR.roll)) + RealTrackIR.z * (sin(RealTrackIR.pitch) * sin(RealTrackIR.roll) + cos(RealTrackIR.pitch) * sin(RealTrackIR.yaw) * cos(RealTrackIR.roll)))

FakeTrackIR.y = RealTrackIR.x * cos(RealTrackIR.yaw) * sin(RealTrackIR.roll) + RealTrackIR.y * (cos(RealTrackIR.pitch) * cos(RealTrackIR.roll) + sin(RealTrackIR.pitch) * sin(RealTrackIR.yaw) * sin(RealTrackIR.roll)) + RealTrackIR.z * (-1 * sin(RealTrackIR.pitch) * cos(RealTrackIR.roll) + cos(RealTrackIR.pitch) * sin(RealTrackIR.yaw) * sin(RealTrackIR.roll))

FakeTrackIR.z = RealTrackIR.x * (-1 * sin(RealTrackIR.yaw)) + RealTrackIR.y * sin(RealTrackIR.pitch) * cos(RealTrackIR.yaw) + RealTrackIR.z * cos(RealTrackIR.pitch) * cos(RealTrackIR.yaw)

FakeTrackIR.pitch = RealTrackIR.pitch
FakeTrackIR.yaw = RealTrackIR.yaw
FakeTrackIR.roll = RealTrackIR.roll

5. There is one other thing to look out for if you want GlovePIE to emulate TIR properly. After running the script for the first time type regedit and look for the key: HKEY_CURRENT_USER\Software\NaturalPoint\NATURALPOI NT\NPClient Location. There should be two path values inside: one is the GlovePie “Path” which tells games where to find NPClient.dll library and the other is labeled “RealPath” which tells GlovePIE where the real NPClient.dll is so it can emulate it. Anyway. If you don’t find this, or if you only have the “Path” value (GlovePIE should create this automatically the first time you run a “FakeTrackIR” script but this didn’t happen for me, hence this explanation) create a FakeTrackIR.reg file with notepad, write the following into it and run it:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\NaturalPoint\NATURALPOI NT\NPClient Location]
"Path" = "C:\\Insert\\GlovePIE\\NPClient\\Directory\\He re"
"RealPath" = "C:\\Insert\\FreeTrack\\or\\TrackIR\\NPClient\\Dir ectory\\Here"

How to adjust parameters to your liking:
1. var.xx = 0.02 is by how much you want to move to the right to line up the gun sight (negative values move left). The value 0.02 works for the Bf 109 so you might have to change this for other planes.
2. var.k = 0.08 is by how much you want to move to each side while looking back towards the tail of the plane. Feel free to experiment with it to see what works best for you (setting var.k = 0 turns this feature off).
3. The line “Mouse.DirectInputY = RealTrackIR.z * 0.6” has a factor of 0.6 which is really the ratio between in-game z-axis head movement and FOV adjustment sensitivity. This factor is used in combination with your z-axis sensitivity settings within Freetrack or TIR software and is most prone to experimentation. I use Freetrack and my z-axis sensitivity is at 0.3 with tons of smoothing (200 local and 150 global) and a large soft-zone curve, so if you find the FOV changes are too violent for you try reducing this number and vice versa.
4. If you don’t like view relative translations a.k.a. ”TrueView” type behavior just delete the lines which start with FakeTrackIR.x, FakeTrackIR.y and FakeTrackIR.z with a lot of sin-cos stuff and instead put in:

FakeTrackIR.x = var.xx + var.x + RealTrackIR.x
FakeTrackIR.y = RealTrackIR.y
FakeTrackIR.z = RealTrackIR.z

That’s it. Simple really. Try it out and tell me what you think.
Reply With Quote
  #14  
Old 04-30-2012, 10:41 PM
Figura's Avatar
Figura Figura is offline
Approved Member
 
Join Date: Aug 2011
Posts: 22
Default

Good idea
__________________
MI PC
Processor: MOS Technology 6510 @ 0,985MHz.
Memori: 64 KB.
Screen: Cathode ray tube monitor.
Operating System: Commodore BASIC 2.0
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:45 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.