I am having a problem getting the head roll functionality to work in skyrim... i was looking for hours to find a working script but nothing helps..
I am using:
Android Device
FreePIE ver. 1.8.569.0
Vireio Perception ver. 2.1.4
this is the script i am using:
[spoiler]
Code: Select all
def update():
global yaw
global pitch
yaw = android[0].googleYaw
pitch = -android[0].googleRoll
vireioSMT.roll = -gaussRoll
diagnostics.watch(yaw)
diagnostics.watch(pitch)
diagnostics.watch(vireioSMT.roll)
def getRaw(z): #n is the denominator for the value
rollRaw.append(math.degrees(-(android[index].googlePitch)) / z)
if starting:
yawMult = 1300
pitchMult = 1000
rollMult = 5
gaussMax = 31 #size of filter to gain stability, must be odd number
index = 0 #which android device to use
centerYaw = 0
centerPitch = 0
centerRoll = 0
yaw = 0
pitch = 0
roll = 0
rollRaw = list()
#calculate gauss matrix
gaussMatrix = list()
for x in xrange(gaussMax):
gaussMatrix.append(2.7182818284 ** (-(x-math.floor(gaussMax/2)) ** 2))
#example if gaussMax = 3, floor(3/2) = floor(1.5) = 1. x-1
#example if gaussMax = 5, floor(5/2) = floor(2.5) = 2. x-2
print gaussMatrix
#get raw data first
for x in xrange(gaussMax):
getRaw(rollMult) #call function raw values with divider as parameter
prevGauss = [0,0,0] #gauss values tracker, [yaw, pitch, roll]
android[index].update += update
enabled = True
#reset gauss values
gaussRoll = 0
#create new gauss values from the collected raw values
#will be updated into vireioSMT in update()
for x in xrange(gaussMax):
gaussRoll += rollRaw[x] * gaussMatrix[x]
#mouse move code starts here
deltaYaw = filters.delta(yaw)
deltaPitch = filters.delta(pitch)
if (enabled):
mouse.deltaX = deltaYaw*1300
mouse.deltaY = deltaPitch*1000
#mouse move code ends here
#remove first values of raw lists
#list.remove takes out the first incident of the value in (x)
rollRaw.remove(rollRaw[0])
#take new value at end of raw lists
getRaw(rollMult)
it contols the cursor to look around and it should give imput to vireio to roll the display.
The problem is: when trying to roll, the screen does not realy rotate... it just runs around is small circles.
showing the effect is easier then explaining, so i uploaded a video... it shows what happens, when i try to roll
the screen starts moving around in circles, but no rolling...
what am i doing wrong?
the watch window in FreePIE shows that the vireioSMT.roll value is increasing and decreasing normaly