User Tag List

Results 1 to 4 of 4

Thread: iOS Angle Extension

  1. #1
    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
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post iOS Angle Extension

    This extension is provided as-is without warranty. You are free to use it to your heart's content at your own risk.

    First of all, download the Zip file from here:

    http://dl.dropbox.com/u/32296241/iOS...for%20MMF2.zip

    Once downloaded extract the zip file and follow these instructions:

    1. Copy Angle.mfx into your MMF2 Program folder under Extensions
    2. Copy Angle.ext to your MMF2 Program folder under Data\Runtime\iPhone
    3. If you plan to create a PC version of your App copy Angle.mfx into your MMF2 Program folder under Data\Runtime.

    There is a sample project called Angle Test.mfa that you can test with. The angle is returned as a value between 0 and 359 just like MMF2 likes for setting the angle of Actives.

    Two very important thing:

    1. On Windows and in the iOS Simulator Angle events DO NOT OCCUR so you always get 0. This will only work on a real iOS running device and is a limitation of the iOS Simulator not the coding.
    2. Every iOS device has a slight imperfection around angle (+/- 4 degrees and rumor is sometimes more) so you may want to either approximate the angle to quantized values such as Int(CurrentAngle/15) * 15 or you may even want to add a simple calibration routine to your app.

    The technique I use to quantize Int(CurrentAngle/15) * 15 above is also a good way to smooth out the reading. I suggest you play with this approach to get the reaction you want though you may simply just want the real deal.

    If you have any questions or suggestions PM me. Hope this helps you guys out.

  2. #2
    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
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Final note: this was tested on an iPhone 4S, iPad 2, and iPhone 3GS and works. The angle is always relative to if the device was upright with the Home button at the bottom. If you run your app in a different orientation you'll need to adjust accordingly.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks for this one too, Keith! I've got a dozen or so ideas for this so far! Have yet to test it, but I will today.

  4. #4
    Clicker Fusion 2.5 DeveloperiOS Export Module
    Czentnar's Avatar
    Join Date
    Jan 2007
    Location
    Budapest, Hungary
    Posts
    819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately, this object causes a EXC_BAD_ACCESS error when it is in the frame and the app wants to leave that frame.
    Tested on iPhone 4S, iOS 6.1.3. The crash does not appear in the simulator, though.

    It is a nice extension, by the way! Thanks for creating it!

Similar Threads

  1. Angle = Angle +0.3
    By Tuna in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 8th November 2013, 01:32 AM
  2. Replies: 4
    Last Post: 8th June 2012, 12:50 AM
  3. angle
    By nick_Peoples in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 16th March 2010, 12:45 AM
  4. Angle?
    By Iharmi in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 28th October 2008, 03:20 AM
  5. Extension-free Angle Calculating for Nifflas
    By LIJI in forum File Archive
    Replies: 5
    Last Post: 26th April 2008, 08:09 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
  •