User Tag List

Results 1 to 7 of 7

Thread: Getting pixel perfect collisions with the physics engine

  1. #1
    Clicker Fusion 2.5

    Join Date
    Oct 2015
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting pixel perfect collisions with the physics engine

    Hey there, first ever post so bit of a newbie.

    I've been using fusion 2.5 for about two weeks now, and there is one problem I continue to bump into, pixel perfect collisions.

    I'm not so worried about collisions with other objects for now, but when some of my objects lie on the ground they sit 1/2 pixels off.

    Here is my file. Use the arrows to move, hold 'z' to pick up objects and let go to throw them. Might have to throw them around a couple of times to understand.

    Platformer_testing.mfa

    Also a screenshot of my problem.
    pixelPerfectg.png

    Many Thanks

    Pladds

  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,156
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Hello and welcome here

    apparently it's a collision shape issue,
    try changing the collision shape in your static physics box movement
    to "shape of first image"

    Physics engine is powerful but sometimes has many things to tweak to get desired results!

  3. #3
    Clicker Fusion 2.5

    Join Date
    Oct 2015
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I definitely see it less after I've changed the collision shape, but it's still happening

    I've read that fast loops can help with pixel perfect collision, but not sure how working alongside the physics system :/

    Thanks, this is the first forum I've joined in a long time, and everyone seem pretty friendly!!

    Pladds

  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,156
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    oh, really?
    I tested a little and it seemed to disappear.
    Btw, on my side it seems to happen only when the box is sitting on its left side.

    Maybe changing boxes pixel size to a uneven number (in order to have a pixel-perfect center hot spot) could help.

    Anyway, I'm not really expert with physics engine so I hope someone can give a better insight

    I could help you with fastloops, but I won't use them together with physics,
    it's likely to end up in a mess

  5. #5
    Clicker Fusion 2.5

    Join Date
    Oct 2015
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea I thought that implementing fastloops and physics would be a mistake.

    Hmm tried changing the size but no luck, I did read that it is to do with the collision system not checking every frame, or every other frame.

    Yea I only get it happening when you throw a box to the left, bizarre. It doesn't show up when auto-rotation is turned off, could be a small price to pay for decent collisions haha

    Thanks for your help btw!

  6. #6
    Clicker Fusion 2.5

    Join Date
    Oct 2015
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just an update, think I've found a work around without turning auto rotate off.

    When the object comes into collision with either another object or the ground then force the direction to return to the original.

    Seems that the left side of the box is a bit glitchy haha

    Pladds

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    jn2002dk's Avatar
    Join Date
    Mar 2014
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Two things you can try to tweak

    Select the physics engine and then look for these
    Screen Shot 2015-11-04 at 08.51.41.jpg

    Setting a higher number will result in more precises calculation but at the expense of performance

Similar Threads

  1. Replies: 5
    Last Post: 26th June 2015, 06:20 AM
  2. [BUG] Pixel perfect scaling does not work in DirectX 9
    By netninja in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 12th September 2013, 04:42 AM
  3. Possible to make some simple object fall physics without physics engine?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd March 2012, 09:56 AM
  4. Replies: 1
    Last Post: 30th December 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
  •