User Tag List

Results 1 to 4 of 4

Thread: Can I make objects move in 2 different directions at the same time automatically?

  1. #1
    Clicker 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)
    Adnihil's Avatar
    Join Date
    Oct 2016
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can I make objects move in 2 different directions at the same time automatically?

    Title might be a bit confusing, what I mean is, imagine a person swimming from one side of a lake to the other. He would get there in a straight line.
    Now imagine that instead of a lake it was a river with moving water. He would get to the other side in the same amount of time but because of the water pushing him down the stream he would not get there in a straight line (OK I know in real life he probably wouldn't get there in the same amount of time because it's harder to swim in moving water but that's besides the point :p).



    Is there a way to have objects move in two directions at the same time automatically? Like if an object is going at a speed of 5 to the right, and it crosses a river/treadmill with a speed of 10 downwards, the object should keep facing right and going right at a speed of 5, but should at the same time be going downward at a speed of 10.

    Up until now I have been manually changing the direction, speed, and direction animation of objects to make it appear as if this is happening but I just realised that if I'm gonna have to do this for every object with a different speed it's going to be a lot of work.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,157
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Yes it's definitely doable, but it mostly depends on which kind of movement you are using


    edit_
    ops, incomplete post sent by mistake, here's the other part of the message
    ____

    from what you say, you're probably using builtin ones,
    say you are using 8 directional movement,
    you could simply say:

    object overlapping river
    >>> set X position to object X + (speed x frame) * cos(river direction in degrees)
    >>> set Y position to object Y - (speed x frame) * sin(river direction in degrees)

    river direction would be a value stating "flow" direction you would store in river object (0=right, 90=top, 180=left, 270=bottom)
    you could even do diagonals and whatever angle you may need with this system

    I think a custom movement will give you greater control over the whole process,
    but you might need some more guidance for that, if these are your first projects in Fusion

  3. #3
    Clicker 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)
    Adnihil's Avatar
    Join Date
    Oct 2016
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, never thought I was ever going to need cosinus and sinus in real life.
    I indeed don't quite understand what you mean by custom movement, or the 'frame' in 'speed x frame', but I'm sure I'll understand once I learn some more! Thanks!

  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,157
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    sin and cos can be your best friends!

    custom movement: a movement you define through events (changing X,Y position of the object) and not using Fusion default movements in object properties "movements" tab. Searching the forum you'll find some examples of different "custom" movements, they generally allow some more flexibility and at times more precision in collisions

    speed x frame: if your game runs at 60 FPS, you are (trying to) drawing 60 frames each second, and Fusion will perform 60 cycles of all the events you have in your editor. So if you have:

    always
    >>> add 3 to X position

    your character will move 3 pixels per frame
    or 3*60 (fps)= 180 pixels each second

Similar Threads

  1. Clicking objects to make them move to a location.
    By GameDesigner in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 22nd December 2013, 02:14 AM
  2. 8 directions: make the object move due to a general event
    By Chokito in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 20th November 2012, 12:27 AM
  3. How do I make objects move with the camera?
    By MindOfCreativity in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 31st May 2011, 08:36 PM
  4. make objects move away from eachother
    By AndyB in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st March 2011, 02:00 PM
  5. objects and 8-directions move
    By qenio in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th January 2011, 01:45 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
  •