When I got freepie working on my PC/Android/Moonlight setup I was ecstatic. Awesome program that does exactly what it is supposed to do. Today I set up my HMD and discovered that horizontal control suddenly doesn't work, or only partially works. Moving the mouse up and down on my screen works as it should, but when I try to move it side to side it refuses to cooperate or will only move a short distance ...
I haven't changed anything I can think of that might account for this ... any ideas?
This is the script I've been using:
def update():
global yaw
global roll
global pitch
yaw = -android[0].googleYaw
roll = -android[0].googleRoll
pitch = android[0].googlePitch
if starting:
yaw = 0
roll = 0
pitch = 0
enabled = False
android[0].update += update
diagnostics.watch(yaw)
diagnostics.watch(roll)
diagnostics.watch(pitch)
deltaYaw = filters.delta(yaw)
deltaPitch = filters.delta(pitch)
deltaRoll = filters.delta(roll)
if math.fabs(deltaYaw) >= math.pi:
deltaYaw = 0
if (enabled):
mouse.deltaX = -deltaYaw*600
mouse.deltaY = -deltaRoll*1000
toggle = keyboard.getPressed(Key.M)
if toggle:
enabled = not enabled
Suddenly Lost Horizontal Control
-
- One Eyed Hopeful
- Posts: 23
- Joined: Tue Apr 21, 2015 5:59 pm
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Suddenly Lost Horizontal Control
This looks fishy
Instead use
I dont think that is the problem though
Code: Select all
if math.fabs(deltaYaw) >= math.pi:
deltaYaw = 0
Code: Select all
filters.delta(filters.continuousRotation(yaw))
-
- One Eyed Hopeful
- Posts: 23
- Joined: Tue Apr 21, 2015 5:59 pm
Re: Suddenly Lost Horizontal Control
Tried changing the code but you're right, that wasn't the problem ...CyberVillain wrote:This looks fishy
Instead useCode: Select all
if math.fabs(deltaYaw) >= math.pi: deltaYaw = 0
I dont think that is the problem thoughCode: Select all
filters.delta(filters.continuousRotation(yaw))
Any ideas on what I should try next?
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Suddenly Lost Horizontal Control
Whats the output from diagnostics.watch(android[0].googleYaw)
it should be something like -pi to +pi or similar when you turn the phone/device in a circle
it should be something like -pi to +pi or similar when you turn the phone/device in a circle