How do I keep the balls inside?

0 favourites
  • 6 posts
From the Asset Store
94 Inside buildings views - Isometric view - PNG transparent - 2048x2048
  • [attachment=1:1cqel3jw][/attachment:1cqel3jw]Dear Friends,

    I am working on a marble machine and had this problem.

    Could anybody please tell me what I am doing wrong?

    The balls fall out of their left side compartments.

    The right side does not give that problem.

    I tried in my opinion everything, but can't get it right.

    Is it a bug? Or am I using the wrong techniques here?

    Image and capx file are uploaded.

    Thanks in advance,

    Any help is much appreciated.

    Philip

  • The problem is that after collision, the balls are 'sleeping.' To be honest, I don't know enough about the physics behavior (yet!) to explain why this is happening... Maybe someone else can explain?

    But I do know that if you give them a little nudge, they wake up. I added this event and it works a lot better... still not perfect, but I hope it helps.

    [attachment=0:2no98ogp][/attachment:2no98ogp]

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • [attachment=0:1eyv1dbb][/attachment:1eyv1dbb]Dear Jillhof,

    Thanks for the quick reply.

    This was a brilliant idea.

    I changed it a bit and now it's not moving (jumping) anymore.

    Thanks a lot, I've never thought about this solution

    It's so helpful!

  • You don't need the everytick... the condition will trigger when ball physics is sleeping. Doesn't help to check 60 times a second lol.

    is sleeper then apply impluse etc

    and make y 0.1 stops it from doing that little jump

    and ...

    Very beautiful. Look forward to final product.

  • DUTOIT You are totally right - not sure why I suggested every tick! oh well, always learning...

  • DUTOIT You are totally right - not sure why I suggested every tick! oh well, always learning...

    No worries - We all use every tick especially when trying to show something in forums (It is just easier) like making text show some variable etc.

    Because we use it as demo (I do all the time) I just like to point out that it isn't always necessary. In fact I'm trying to think of something that requires every tick... lol, I can't think of anything.

    The game runs through the eventsheet(s) everytick, so any conditions triggers when they are true based on the conditions criteria.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)