User Tag List

Results 1 to 5 of 5

Thread: Device held at various angles and the acceleromter coordinates for those angles?

  1. #1
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Device held at various angles and the acceleromter coordinates for those angles?

    Is there any documentation on this? I've dug through the board but haven't found any conclusive data.

    My goal in this is to determine if the device is being held between 0-45 or 45-90 degrees when a touch has occurred. I'm finding it VERY hard to figure this out with these ever-changing accelerometer X,Y,Z variables!

  2. #2
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Add the accelerometer object, then grab the x and y values from it and put it in the atan2( y, x ) function. You could add a counter to your frame to display the value while testing, so you can get your bearings with the angles returned.

    You can multiply the accelerometer values out first (eg: by 100.0 ) if the precision causes problems for you.
    Andy H @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does this angle extension for MMF not give you what you need?

    http://community.clickteam.com/showthread.php?t=67735

  4. #4
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Between my iDevices and laptop, I'm getting weird double posts. So sorry if my other response actualy IS on here. In case its not, I'm looking to tilt the device between being held upright at a 90 degree angle in portrait mode, to being tilted flat down backwards against a table. The extension only seemed to do left/right, unless I'm dumb as hell and am missing something. I wouldnt be surprised at all if it's me and not hte extension. lol

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,144
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Check out Pineapple's "Fun With Accelerometers" example: http://community.clickteam.com/showthread.php?t=70186

Similar Threads

  1. Angles / Rotation
    By Panchos in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 12th November 2013, 06:25 PM
  2. How do i set the # of angles to 360?
    By GaryFreeman in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st September 2011, 01:13 AM
  3. Angles Example for EE
    By Eliyahu in forum File Archive
    Replies: 0
    Last Post: 24th April 2011, 01:34 AM
  4. angles?
    By Zerodin in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 5th May 2007, 03:04 PM
  5. angles
    By Horn in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 4th November 2006, 04:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •