User Tag List

Results 1 to 3 of 3

Thread: Need help with collisions please

  1. #1
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Mar 2014
    Posts
    163
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)

    Need help with collisions please

    In trying to make my own movements I basically created the same bouncy collision in the built-in movements . If I didn't add friction and acceleration it would be simple. How on Earth do I structure this using such variables? I was thinking it's just a matter of setting accel and xSpeed to 0 and pushing object player out by 1 pixel upon overlap but I get bouncy when pressing against the wall.

    Here's the MFA:
    Attached files Attached files

  2. #2
    Clicker

    Fusion 2.5Android Export Module

    Join Date
    Jan 2007
    Posts
    278
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    The issue is that you are moving the object in more than 1 pixel increments. You should start a loop that runs "XSpeed" number of times when "XSpeed" is higher than 0. This loop should only run when the player is moving and not overlapping an obstacle - it should also move the player 1 pixel per loop.

    IE: If your x speed is 8 your loop will run 8 times. Each iteration of the loop the player moves 1 pixel and also checks for collisions. If a collision is detected the loop terminates early.

    You also REALLY need to implement sensors that move with your object so you can detect collisions from all directions. Up down left and right sensors.



    quick edit.mfa

    tl;dr

    Use loops to move objects in 1 pixel increments to avoid overlaps.

    Use sensors so you can detect collisions from multiple directions. This also gives you a reference point that can keep overlap from happening AND allow you to push objects out properly if overlap occurs.

  3. #3
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Mar 2014
    Posts
    163
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the great tip. Here's what I got so far:

    Is this correct? Seems to work just fine...

    quick edit PART 2.mfa

    Now i seem to have another problem... I don't have my friction / decay when i release or stop moving the player. I got a pretty good feeling i know why but collisions really trip me up in Fusion. Having to wrap movement in Fast-Loops tend to throw me off. What would be the best way to get my friction back?

Similar Threads

  1. Specific Collisions
    By CodeCannon in forum File Archive
    Replies: 4
    Last Post: 13th May 2009, 03:37 PM
  2. Collisions with 247
    By LB in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th April 2008, 01:52 AM
  3. Collisions.
    By Conno in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 22nd November 2006, 06:02 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
  •