Character Ignores Colission Shape (video)

Discussion in 'Buildbox 3.0' started by Kaius, Sep 4, 2019.

  1. Kaius

    Kaius Boxer

    Joined:
    Aug 25, 2019
    Messages:
    9
    Likes Received:
    0
    Hi there,

    I guess, I will contact you very often in the next time. Today I got this problem. I'm an absolute beginner and I can't even solve this problem (and others). Do you know, what to do?



    Best greetings,
    Kaius
     
  2. PunkPuffin

    PunkPuffin Avid Boxer

    Joined:
    Sep 27, 2018
    Messages:
    285
    Likes Received:
    195
    That issue is because it is moving so fast that it basically skipped the physics checks where the collision would have been.

    Don't allow it to move that fast
     
  3. Kaius

    Kaius Boxer

    Joined:
    Aug 25, 2019
    Messages:
    9
    Likes Received:
    0
    Okay, thanks for the tip. But I only activated the touch control. Where can I limit the max. speed of my character?
     
  4. buildboxuser

    buildboxuser Boxer

    Joined:
    Feb 3, 2019
    Messages:
    34
    Likes Received:
    9
    I did't do it for touchMove node, but you will have to edit touchMove script:

    Code:
    function touchMove(point) {
        if (!enabled) return;
        let dx = sens.x * (point.x - prev.x);
        let dy = sens.y * (point.y - prev.y);
        let vel = getVelFromScreenMove(dx,dy);
        delta = delta.add(vel);
        prev = point;
    }
    
    Try something like this:

    Code:
    let MAX_ALLOWED = 30;
    function touchMove(point) {
        if (!enabled) return;
        let dx = sens.x * (point.x - prev.x);
        let dy = sens.y * (point.y - prev.y); 
        var vel = getVelFromScreenMove(dx,dy);
        if(vel >= MAX_ALLOWED)
            vel = MAX_ALLOWED;
        delta = delta.add(vel);
        prev = point;
    }
    
     
    Kaius likes this.
  5. buildboxuser

    buildboxuser Boxer

    Joined:
    Feb 3, 2019
    Messages:
    34
    Likes Received:
    9
    After limiting the speed, you might get into another issue - your ball still can skip initial border collision and get stuck in a wall when collision detection start working.
    Was not able to find a way how to fix this, ball basically gets stuck in a wall with endless collision events :)
     
    Kaius likes this.
  6. Kaius

    Kaius Boxer

    Joined:
    Aug 25, 2019
    Messages:
    9
    Likes Received:
    0
    Well, okay, thanks. Shouldn't be there a way that this doesn't happen without changing the node? I mean touch control is used very often. So everyone must have this problem?
     
  7. buildboxuser

    buildboxuser Boxer

    Joined:
    Feb 3, 2019
    Messages:
    34
    Likes Received:
    9
    Goods questions)

    > So everyone must have this problem?
    I saw few posts on forum on subject, and limiting the speed was the answer. I did apply limiting to touch rotate node (well, to extent which not affect user experience), but there is still glitch with actor "stuck"-ing in an obstacles, since obstacles are moving with limited speed and actor is moving with limited speed and sometimes this multiply I guess...
     
    Last edited: Sep 5, 2019
  8. PunkPuffin

    PunkPuffin Avid Boxer

    Joined:
    Sep 27, 2018
    Messages:
    285
    Likes Received:
    195
    You can try adjusting the sensitivity
     
    Kaius likes this.
  9. Kaius

    Kaius Boxer

    Joined:
    Aug 25, 2019
    Messages:
    9
    Likes Received:
    0
    Oh ... that's better ... I already did this, but now it's only 0.02. Maybe that's the solution. I'll try it with the finished game and hope taht it works. Thanks a lot so far!
     
  10. buildboxuser

    buildboxuser Boxer

    Joined:
    Feb 3, 2019
    Messages:
    34
    Likes Received:
    9
    Yeah, but this affects responsiveness of touchMove - you want to keep it responsive, but limit the max speed
     
  11. Kaius

    Kaius Boxer

    Joined:
    Aug 25, 2019
    Messages:
    9
    Likes Received:
    0
    I tried it. It's better, but it still happens, if I provoce it. Hm.
     
  12. PunkPuffin

    PunkPuffin Avid Boxer

    Joined:
    Sep 27, 2018
    Messages:
    285
    Likes Received:
    195
    Try increasing the Physics -> Sub Steps in your world settings. It should be 1. Try 4 and see how it goes. The lower the better for performance but you might find a balance that works for you.
     
  13. buildboxuser

    buildboxuser Boxer

    Joined:
    Feb 3, 2019
    Messages:
    34
    Likes Received:
    9
    did_not_help.png

    It was set to 3 in my project, tried 6 - same thing: ball hits moving obstacle and in rare cases stucks)
     
  14. Josh (Nology Games)

    Josh (Nology Games) Avid Boxer

    Joined:
    Nov 27, 2017
    Messages:
    200
    Likes Received:
    155
    You mind like the idea of thinking out side of the “buildbox” on this one. As this is a bug that we have not figured out, why don’t you make it a game mechanic. Like instead of only letting it happen due to a bug, just make it so you can easily fall off the edge. It would change the concept but that’s not always a bag thing. Quite a lot of great games added a feature making the bug more fun.
     
  15. B2D

    B2D Boxer

    Joined:
    Apr 4, 2020
    Messages:
    8
    Likes Received:
    6
    I also have this bug and can't find out why it happens. The suggestion "Try increasing the Physics -> Sub Steps in your world settings." didn't help. Have you guys another idea?
     

    Attached Files:

  16. Okan13

    Okan13 Boxer

    Joined:
    Apr 17, 2020
    Messages:
    7
    Likes Received:
    0
    Hi, same problem here :(. Did you find a solution?
     

Share This Page