User Tag List

Results 1 to 5 of 5

Thread: Question: How Do I make an active object rotate to a certain object?

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2016
    Location
    My house
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question: How Do I make an active object rotate to a certain object?

    I Need to make a bouncing ball object rotate to the player (Example would be a homing missile)
    I only want to use the single direction image in the bouncing ball and make it turn.
    But, I've gone through the settings and cannot seem to find out how to make it turn.
    This will make the game's graphics look more realistic, and i wont have to make multiple directions.


    So if anyone can explain to me how to make The bouncing ball object rotate to the player, that would be great!
    (remember; like a homing missile)

    I already make it go to the target, just need rotation. Thanks!

  2. #2
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    664
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Turn automatic rotations on in the ball's properties. Then set its speed etc and make an always event:

    Always
    -look in the direction of the player

    This will make it rotate towards the player's position (and move towards it too if you're using the bouncing ball movement).

    Alternatively, you can adjust the angle itself using this hefty expression

    set angle to:
    -- Angle( "Active" ) + Max(Min(( ( ( ATan2(Y( "Active" ) - YTarget, XTarget - X( "Active" ) ) - Angle( "Active" ) + 540 ) mod 360 ) - 180 ), Turn Speed), 0-Turn Speed )

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The ADO Object does this rotations for you easily.
    It has a function that does just this ( Rotate and Object from DirectionA to DirectionB at a Speed ).
    Just make sure to to set the ADO property to the 'direction system' you are working with ( if you are working with the 32 dir system set it to 32, if you are working with the 360 degree system set it to 360 etc ).
    The built in movements use the 32 direction system.

    Using the 32 dir system for this is abit clunky in my oppinion, but it works.
    As the minimum rotation speed in the 32 dir system is 1, its hard to get a slow/ smooth rotation without adding something like 'Every X milliseconds' to the rotation Event ( compair Frame#1 to Frame#2 ).

    Note that i have chosen to alter the Angle of the Missile instead of generating directions ( as this looks muuuch nicer in comparrison ).
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Nicholas Martin's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! This was super helpful.

  5. #5
    Clicker Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2018
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help

    Quote Originally Posted by Nicholas Martin View Post
    Thanks! This was super helpful.
    none of this doesn't work for me
    I want to make a Sentry Gun......

Similar Threads

  1. Replies: 3
    Last Post: 18th October 2016, 11:09 AM
  2. Replies: 3
    Last Post: 26th October 2015, 01:47 PM
  3. How to make a backdrop object overlap an active object? mfa included
    By path in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 30th August 2012, 11:07 PM
  4. Help Please... Need to Rotate Rotate object with a wheel
    By Tuna in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 12th February 2012, 05:48 PM
  5. Rotate active object about a point
    By Digitalic in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 3rd June 2010, 04:21 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
  •