User Tag List

Results 1 to 4 of 4

Thread: Caulculate angle between two objects

  1. #1
    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)

    Caulculate angle between two objects

    So I'm currently considering removing non-Java supported extensions from certain games in an attempt to get them running in browsers, but one of my games requires a very important calculation, which is calculating the angle between two sensors.

    I currently do this using the Advanced Math Object, but since this object isn't Java compatible, I need to do it another way.

    Is there a way of doing this with any of the extensions which support Java? I'm talking about 360 degree angle detection, not 32 directions.

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Caulculate angle between two objects

    Use the atan2 expression, and put in the x and y difference in position. I'm not sure where atan2 has its 0 or which way it goes, so you may need to do 0-atan2() or 90+atan2() or something to get it to match the adv math object.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Posts
    1,027
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Caulculate angle between two objects

    The Clickteam Movement Controller allows for calculating an angle between two objects/two points.

  4. #4
    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)

    Re: Caulculate angle between two objects

    Thanks guys! I used Pkeod's suggestion of the Clickteam Movement Controller, the game's running in Java now.

Similar Threads

  1. Replies: 3
    Last Post: 31st January 2013, 12:04 AM
  2. Angle towards...
    By Wolfking_Warrior in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th October 2012, 05:35 PM
  3. Active Objects: change angle
    By Nick in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 2nd March 2009, 06:10 PM
  4. Angle?
    By Iharmi in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 28th October 2008, 03:20 AM
  5. How to see angle between 2 objects
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 14th May 2008, 09:27 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
  •