How do I keep the balls inside?

Just started using Construct 2? Post your questions here

Post » Thu Oct 30, 2014 12:29 pm

Balls.PNG
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
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 14
Reputation: 260

Post » Thu Oct 30, 2014 1:30 pm

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.

screenshot.png
You do not have the required permissions to view the files attached to this post.
B
7
S
1
Posts: 16
Reputation: 711

Post » Thu Oct 30, 2014 2:06 pm

Physics.PNG
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 do not have the required permissions to view the files attached to this post.
B
5
Posts: 14
Reputation: 260

Post » Thu Oct 30, 2014 2:12 pm

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.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Thu Oct 30, 2014 2:21 pm

@DUTOIT You are totally right - not sure why I suggested every tick! ;) oh well, always learning...
B
7
S
1
Posts: 16
Reputation: 711

Post » Thu Oct 30, 2014 2:26 pm

jillhoff wrote:@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.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708


Return to Beginner's Questions

Who is online

Users browsing this forum: Google [Bot] and 1 guest