Dive Board
-
Re: Durovis Dive Play Computer Games Easy Step Guide
Re: Durovis Dive Play Computer Games Easy Step Guide
by Amantis on Jul 4th, 2014 05:27 AM
def update(): <br /> #Apply deadband filter to avoid drift<br /> #And continousRotation filter to yaw axis to avoid jumps when passing tracker center<br /> x = filters.deadband(filters.delta(math.degrees(filters.continousRotation(android[0].yaw))), deadband)<br /> y = filters.deadband(filters.delta(math.degrees(-android[0].pitch)), deadband)<br /> <br /> mouse.deltaX = x * multiply<br /> mouse.deltaY = y * multiply<br /> <br />if starting: <br /> deadband = 0.01<br /> multiply = 5<br /> android[0].update += update
Amantis
Posts: 22
Joined: 27.06.2014
Re: Durovis Dive Play Computer Games Easy Step Guide
by Sipheren on Jul 4th, 2014 05:40 AM
"Amantis" wrote:
code
Try this one, it's from the first page of this thread.def update():<br /> global yaw<br /> global roll<br /> global pitch<br /> yaw = -android[0].googleYaw<br /> roll = -android[0].googleRoll<br /> pitch = android[0].googlePitch<br /><br />if starting:<br /> yaw = 0<br /> roll = 0<br /> pitch = 0<br /> enabled = False<br /> android[0].update += update<br /><br />diagnostics.watch(yaw)<br />diagnostics.watch(roll)<br />diagnostics.watch(pitch)<br /><br />deltaYaw = filters.delta(yaw)<br />deltaPitch = filters.delta(pitch)<br />deltaRoll = filters.delta(roll)<br /><br />if (enabled):<br /> mouse.deltaX = -deltaYaw*600<br /> mouse.deltaY = -deltaRoll*1000<br /><br />toggle = keyboard.getPressed(Key.M)<br /><br />if toggle:<br /> enabled = not enabled
You might want to keep the drift removal part from the start.Sipheren
Posts: 19
Joined: 27.06.2014
Re: Durovis Dive Play Computer Games Easy Step Guide
by Amantis on Jul 4th, 2014 05:53 AM
That one does nothing, mouse doesn't move at all. Is there something special I have to do?
Amantis
Posts: 22
Joined: 27.06.2014
Re: Durovis Dive Play Computer Games Easy Step Guide
by Sipheren on Jul 4th, 2014 06:00 AM
"Amantis" wrote:
That one does nothing, mouse doesn't move at all. Is there something special I have to do?
Not that I know of.
Make sure you have freePIE installed and running on your phone and then start the script.Sipheren
Posts: 19
Joined: 27.06.2014
Re: Durovis Dive Play Computer Games Easy Step Guide
by Amantis on Jul 4th, 2014 06:09 AM
Er, yeah did that its how I got the other script to work. Doesn't do anything
Amantis
Posts: 22
Joined: 27.06.2014
Re: Durovis Dive Play Computer Games Easy Step Guide
by Amantis on Jul 4th, 2014 06:15 AM
Oh god I have to press M to toggle.
Amantis
Posts: 22
Joined: 27.06.2014
Re: Durovis Dive Play Computer Games Easy Step Guide
by Sipheren on Jul 4th, 2014 06:16 AM
"Amantis" wrote:
Oh god I have to press M to toggle.
Oh sorry, forgot to mention that. It has a toggle there at the bottom of the script so you can disable it.Sipheren
Posts: 19
Joined: 27.06.2014
Re: Durovis Dive Play Computer Games Easy Step Guide
by Moerf on Jul 4th, 2014 10:48 AM
You should also use this lines to prevent the mouse from jumping when you reach the end of the screen:
<br />if math.fabs(deltaYaw) >= math.pi:<br /> deltaYaw = 0<br />
so in total:<br />def update():<br /> global yaw<br /> global roll<br /> global pitch<br /> yaw = -android[0].googleYaw<br /> roll = -android[0].googleRoll<br /> pitch = android[0].googlePitch<br /><br />if starting:<br /> yaw = 0<br /> roll = 0<br /> pitch = 0<br /> enabled = False<br /> android[0].update += update<br /><br />if math.fabs(deltaYaw) >= math.pi:<br /> deltaYaw = 0<br /><br />diagnostics.watch(yaw)<br />diagnostics.watch(roll)<br />diagnostics.watch(pitch)<br /><br />deltaYaw = filters.delta(yaw)<br />deltaPitch = filters.delta(pitch)<br />deltaRoll = filters.delta(roll)<br /><br />if (enabled):<br /> mouse.deltaX = -deltaYaw*600<br /> mouse.deltaY = -deltaRoll*1000<br /><br />toggle = keyboard.getPressed(Key.M)<br /><br />if toggle:<br /> enabled = not enabled<br /><br />
Moerf
Posts: 21
Joined: 10.12.2013
Re: Durovis Dive Play Computer Games Easy Step Guide
by nils16 on Jul 4th, 2014 16:17 PM
Thx, but then comes "Line: 16: name 'deltaYaw' is not defined"
nils16
Posts: 29
Joined: 25.11.2013
Re: Durovis Dive Play Computer Games Easy Step Guide
by Sipheren on Jul 5th, 2014 00:51 AM
"nils16" wrote:
Thx, but then comes "Line: 16: name 'deltaYaw' is not defined"
Try this:def update():<br /> global yaw<br /> global roll<br /> global pitch<br /> yaw = -android[0].googleYaw<br /> roll = -android[0].googleRoll<br /> pitch = android[0].googlePitch<br /><br />if starting:<br /> yaw = 0<br /> roll = 0<br /> pitch = 0<br /> enabled = False<br /> android[0].update += update<br /><br />diagnostics.watch(yaw)<br />diagnostics.watch(roll)<br />diagnostics.watch(pitch)<br /><br />deltaYaw = filters.delta(yaw)<br />deltaPitch = filters.delta(pitch)<br />deltaRoll = filters.delta(roll)<br /><br />if math.fabs(deltaYaw) >= math.pi:<br /> deltaYaw = 0<br /><br />if (enabled):<br /> mouse.deltaX = -deltaYaw*600<br /> mouse.deltaY = -deltaRoll*1000<br /><br />toggle = keyboard.getPressed(Key.M)<br /><br />if toggle:<br /> enabled = not enabled
Sipheren
Posts: 19
Joined: 27.06.2014
RECENT TOPICS
Power Meets Style: The Woozoo Fan Advantage
Money6x: The Global Platform for Earning Online
Freelancing on Money6x: High-Paying Projects
STATISTICS
Total posts: 171732
Total topics: 41609
Total members: 44855
Newest member: Daniel G.
Meet the