User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: 360 problem

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    360 problem

    I got this object which circles around another object.

    This may sound strange, but I want the circle (it uses Alterable Value A to set it's angle) to go the closest direction of the pressed button.

    IE: Pressing up and the object is to the left, it takes the right turn to the top and not the left turn.


    Please help :3

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 problem

    Suppose that X is the angle you want to rotate to, and A is the current angle of the object. You need four events:
    Code:
    *A<X
    +X-A<=180
     -->Add 1 to A
    
    *A<X
    +X-A>180
     -->Sub 1 to A
    
    *A>X
    +A-X<=180
     -->Sub 1 to A
    
    *A>X
    +A-X>180
     -->Add 1 to A
    You also need to make sure X and A will "loop around" if they are greater than 359 or lower than 0. If you use an object's "angle" attribute then this will happen automatically (I think).

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 problem

    I'm afraid that doesn't work at all D=

    Example: X = 270, A = 0.
    A < X
    X - A >= 180
    Add 1 to A.

    See how that just messes up and turns the wrong way?

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 problem

    Bump as this really matters to me D=

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 problem

    You can use the advanced direction object. That lets you rotate to a certain over time.

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 problem

    []You can use the advanced direction object. That lets you rotate to a certain over time. [/]
    Could you make an example? I don't have much experimence with the Advance Direction Object <img src="/center/images/graemlins/frown.gif" alt="" />

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 problem

    Not really. I don't have mmf2 on this computer and the computer I do have it on is rendering a large 3d scene.

    It's an expression in the advanced direction object called rotate towards angle or something like that. It should be pretty self explanatory.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 problem

    []I'm afraid that doesn't work at all D=

    Example: X = 270, A = 0.
    A &lt; X
    X - A &gt;= 180
    Add 1 to A.

    See how that just messes up and turns the wrong way? [/]


    Erm, I never typed that event. Check the events I wrote up there again, in this situation A would be decremented. I have used these events and they work just fine. There is no need for an extension in this situation, although if you want to take the slightly easier route I guess that's OK.

  9. #9
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 problem

    []Erm, I never typed that event. Check the events I wrote up there again, in this situation A would be decremented. I have used these events and they work just fine. There is no need for an extension in this situation, although if you want to take the slightly easier route I guess that's OK. [/]
    It was an example of 2 values which would screw up what you made. If it works for you, though, you could post an example as I pretty much need this D=

  10. #10
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 problem

    ...anyone?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Pulling Problem and Shooting Problem
    By Duggabboo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 21st March 2010, 05:24 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
  •