Make friction work with a circle collision mask

Get help using Construct 2

Post » Sun Feb 19, 2012 6:33 pm

Every time I use a circle collision mask, friction is completely ignored. I tried reducing bounciness to 0 (and friction to 100, even when I suppose anything above 1 will be 1) in both objects, but the ball completely ignores the friction.

I would do a polygon collision mask, but I want a very big circle interacting, and that just wouldn't work.

http://dl.dropbox.com/u/41192999/friction0.capx <- capx demonstrating.

PS: I don't know if I'm doing something wrong, otherwise I suppose it's a bug (because a ball should stop down a hill if both have such friction!)
B
22
S
3
G
6
Posts: 59
Reputation: 4,450

Post » Sun Feb 19, 2012 7:30 pm

I had to disable your events as I don't see the issue as it was.

The yellow ball is rolling down the slope since it has a high friction. If the friction were zero then the ball would slip down the slope. Now if you give the ball a high friction and set "Prevent rotation" to yes then the ball won't go down the slope.

Does that help or am I missing the issue?
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Sun Feb 19, 2012 7:38 pm

OMG, sorry, I kept on editing the same file, let me revert to original... But shouldn't friction prevent rotation? I want it to rotate, but to stop quickly...

I'm going to try what you said and see what happens (and save it in another file, sorry, I reverted this to the original).

Edit:
What I'm really trying to do is make two balls (rotating normally) attract to each other, and once they're in contact, the bigger ball can take the other around. Like a planet carries things and not let them stay in the same point of space.kirby2012-02-19 19:49:46
B
22
S
3
G
6
Posts: 59
Reputation: 4,450

Post » Sun Feb 19, 2012 8:25 pm

Friction does not prevent rotation, it only keep the object from sliding on the object it's touching.

You could apply a torque in the opposite direction as the angular velocity.

+Every Tick
---Sprite2 | Apply Physics torque -0.1*Sprite2.Physics.AngularVelocity
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Sun Feb 19, 2012 9:31 pm

Thanks! I got it working n__n!
B
22
S
3
G
6
Posts: 59
Reputation: 4,450


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests