User Tag List

Results 1 to 6 of 6

Thread: Guiding the bouncing ball?

  1. #1
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)

    Join Date
    Nov 2014
    Posts
    66
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Guiding the bouncing ball?

    So I've got an object set up to the bouncing ball movement, and I want the player to be able to guide the direction in which this object bounces, when the player collides with it (i.e. to push it towards a goal, to break a wall etc.). The player the bouncing object bounce off one another, but it would seem, that the player is not really effecting the direction of the bouncing object.

    So far this is what I've got (disregard the Physics engine stuff. I'll be deleting that):

    baby kit bounce.jpg

    "Group.Arms" is the bouncing object, and "Group.Player" is...the player.

    I'm also not sure if Fusion's native bouncing movement would be best, or if I should revert back to the physics version as I'd had (recommendations welcome). The only problem is, when using a physics engine for the bouncing object, I'm having a harder time narrowing down the collision between it and the player.

    Just as an FYI or FWIW, the player is using the platform movement object.

  2. #2
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)

    Join Date
    Nov 2014
    Posts
    66
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Should I make an example MFA? There's really not much to demonstrate, I don't think.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,184
    Mentioned
    199 Post(s)
    Tagged
    0 Thread(s)
    If your ball is not doing what you expect it to do you could have conflicting code - for example you're telling the ball to look at the player - which sets a direction towards the player - and then the very next line you're telling it to set a different direction - which negates condition 1 (which is going to happen for only a very brief split second). There might be code elsewhere in your .mfa that also triggers a contradictory command.

    You would probably need to do it in a couple of steps.

    When the player collides turn a flag on for the ball - if that flag is on - test the direction of the player and then send the ball in that direction - turn the flag off.

    Then check for other code that sets the direction of the ball and change them to only trigger when that flag is off.

  4. #4
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)

    Join Date
    Nov 2014
    Posts
    66
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    @Janette5

    Unfortunately I'm not at my computer at the moment, but I was thinking about what you suggested and came up with this:

    "Player" overlaps with "Bouncing Ball" + "Player" is facing Left> Set Flag ("Directions") On
    Flag ("Directions") is on > Set Bouncing Ball direction to left + Bounce "Bouncing Ball" + Turn Flag Off

    Does that make sense? I've yet to get to try this, but this is what I came up with off memory.

    How does one check for the direction of an object, by the way?

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,184
    Mentioned
    199 Post(s)
    Tagged
    0 Thread(s)
    Attached is a rough example of what you'd have to do - you can play around with it and refine it.

    The player has 8 direction movement which is controlled with the arrow keys - so its direction depends on the arrow key pressed.

    The ball will then react to that and for long enough that the player can somewhat control the ball.
    Attached files Attached files

  6. #6
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)

    Join Date
    Nov 2014
    Posts
    66
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Janette5 View Post
    Attached is a rough example of what you'd have to do - you can play around with it and refine it.

    The player has 8 direction movement which is controlled with the arrow keys - so its direction depends on the arrow key pressed.

    The ball will then react to that and for long enough that the player can somewhat control the ball.
    That's AMAZING! I think this might be exactly what I needed! You rock for that!

Similar Threads

  1. Bouncing Ball
    By lembi2001 in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 2nd February 2014, 10:25 AM
  2. Bouncing Ball
    By Angelfox in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 13th February 2009, 01:09 AM
  3. Bouncing Ball
    By Game_Master in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 16th December 2008, 08:01 PM
  4. Bouncing ball?
    By Iharmi in forum Multimedia Fusion 2 - Technical Support
    Replies: 23
    Last Post: 27th May 2008, 04:36 AM
  5. a better bouncing ball?
    By frateroshi in forum Extension Development
    Replies: 35
    Last Post: 7th July 2006, 02:23 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
  •