Velocity not changing after collisions

I want the ball to bounce after collision. I dont understand what is preventing that.

I try to change:
velocitytreshold and fixeddeltatime

Ball:
Rigidbody 2d:
Dyanmic
max 0.1
drags are 0
collision : continuous
5093933--501953--Ball.PNG

Pad:
Rigidbody 2d:
kinematic
5093933--501956--Pad.PNG

both have colliders attached.

Probably because nothing is moving here. I suspect you’re just setting the angle of the flippers which just causes an overlap of the ball which the physics system solves. Essentially you’re just teleporting the flipper from one pose to another. Continuous isn’t involved because again, nothing is actually moving.

You need to use Rigidbody2D.MoveRotation, set the angular velocity or add torque. All of these involve the flipper actually moving.

2 Likes

Also, please don’t cross post on multiple forums.

1 Like

Thank you so much. It solved my problem. And now I have another problem. After collision ball moves too fast. How can i set the bouncing after collision. I play with drags and mass but I could not get it done. It is only happens when I slow down the flipper rotation speed. But then the feel is gone.

PS: Sorry for the duplicate threads. I thought physics forum is better for this post. But cannot delete the older one.

All I have to go on is guesswork as you’re not actually providing any info on what you’re doing just “it solved my problem” :wink:

Maybe if you’re using MoveRotation you’re moving it from one angle instantly to another or very quickly which means it’ll have a very high angular velocity. This will cause the ball to have a high velocity impact (lots of energy). You wouldn’t use linear drag for that, you want to control the impact speeds in the first place. Also the “bounce” isn’t going to do change this that much. In the end, without more info it’s hard to tell you how to tune it.

1 Like

Hi,
First I was rotating the “transform”. Than I rotate “rigidbody” as you said. “It solved my problem” part was for that :smile:
I mean, the flippers are colliding exactly how it supposed to be.
But as you said because of I rotate flippers fast this will cause the ball to have a high velocity impact.
I changed the Physics2D.maxTranslationSpeed to a lower value to solve it.

You really shouldn’t do that as it affects everything globally. It’s far better for you to simply rotate the flippers slower. Anyway, if you’ve not got many moving pieces then whatever works is good. Just be aware that in the future you might find other things hit that limit too and increasing it breaks the flippers.