User Tag List

Results 1 to 9 of 9

Thread: how do I limit angle max amount of rotation without using too many events?

  1. #1
    Clicker

    Fusion 2.5 (Steam)

    Join Date
    Dec 2014
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how do I limit angle max amount of rotation without using too many events?

    and alt values?

    I can do this using alot of alt values and checks but I need to do this in a few lines, I need to correct for or check if the object is flipped or not, here is an example of what I mean:

    set_angle_limitrot.mfa

    it doesnt quite work, it almost works but its wrong
    please note, im trying to do this without "Set Direction"

  2. #2
    Clicker Fusion 2.5 (Steam)

    Join Date
    Feb 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    set angel(of the object) to OAngle( "Active", XMouse, YMouse ) that what you looking for?

  3. #3
    Clicker

    Fusion 2.5 (Steam)

    Join Date
    Dec 2014
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah no, i just need to rotate towards the mouse with a fraction of its overall rotate so it doesnt rotate fully in either direction, but also flipped, and without using "Set Direction", just math.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Don't understand what you need to do,
    would ask a couple questions to understand:

    1) Why do you need to "flip" the object?
    You want it not to be rotated "upside down" when facing opposite direction from starting one?

    2) You want to gradually rotate towards target direction and not instantly facing the angle to target?

  5. #5
    Clicker

    Fusion 2.5 (Steam)

    Join Date
    Dec 2014
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes to the first question, I want to basically have it flip and only rotate a fraction of an angle towards a point within bounds. But I want to do it without using alot of events.

    I want it do that but not reach the target direction.

    basically I am rotating a very heavy object to a tiny point on screen, and because of its simulated "mass" I want it to only be able to rotate a fraction of the angle towards a point to the right or left of it, and it flips much like setting negative x scale but I want it to also preform the same math to its left facing while flipped.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    here's a quick example of rotation
    but not sure why you would want to flip horizontally
    would look "strange" to me?

    set_angle_limitrot_1.mfa

  7. #7
    Clicker

    Fusion 2.5 (Steam)

    Join Date
    Dec 2014
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here is a better illustration of what I am trying to accomplish, I just realized that when flipping horz with the effect built in it flips the rotational axis and makes 360/0 switch places with 180, and of all things, makes 270 invert to 90.

    if someone could explain this to me I'd appreciate it, thank you: set_angle_limitrot_2.mfa

  8. #8
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleInstall Creator Pro
    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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    667
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Is this what you're looking to achieve? limiting_angle_and_flip.mfa
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/R3WuvF3mHr

  9. #9
    Clicker

    Fusion 2.5 (Steam)

    Join Date
    Dec 2014
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thats what I needed, thanks, can you tell me though when it is flipped why you switched the order of this:
    not flipped:
    ATan2(YMouse - Y( "spotlight" ), X( "spotlight" ) - XMouse )
    flipped:
    ATan2(Y( "spotlight" ) - YMouse, XMouse - X( "spotlight" ) )
    and I see here:

    ( AngleMouse( "spotlight" ) / ( 180.0 / AngleLimit( "spotlight" ) ) )
    is the angle limit being divided by half of 360 degrees for a reason? I'm guessing its because its the limit of range of motion divided by range in degrees allowed to move?

    do you divide this number by the angle from the mouse to get what someone would need? I'm pretty sure im looking at this wrong, any help to understand would be appreciated, thanks again.

Similar Threads

  1. Replies: 0
    Last Post: 1st May 2016, 09:29 AM
  2. Active object amount limit?
    By Bonehead in forum Fusion 2.5
    Replies: 17
    Last Post: 19th March 2016, 12:10 PM
  3. Replies: 2
    Last Post: 23rd January 2016, 11:52 PM
  4. Replies: 2
    Last Post: 26th February 2015, 08:41 AM
  5. Limited amount of Groups/Events?
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 4th February 2009, 02:56 AM

Posting Permissions

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