Just Finished Lecture 79, Not Sure About Something

I’m at lecture 79 and I just noticed that if I bounce the ball at sharp angle such that it is going sideways a lot, the ball will fall on its own. This is most likely a function of the gravity which is now -1 rather than -9.8, but I want to know, did I mess up, or is this one of those things where a future lecture will point out this discrepancy and we will modify the code accordingly.

Hi Peteman,

I’ve finished the Ball Breaker section a couple of days ago and remember making the very same observation. And there’s a good news / bad news scenario here:

Bad News: This particular issue is not being picked up again in the Ball Breaker section and will stay like this unless you decide to change it on your own.

Good News: It should be relatively easy to eliminate as it’s purely based on the Gravity settings as you’ve said yourself.

So no, you didn’t mess up at all, it’s just one of the items that wasn’t addressed further in the course.

Dennis

Also play with the drag settings on the rigid body.

A little bit late but I am looking at this myself. According to the manual https://docs.unity3d.com/ScriptReference/Rigidbody2D-velocity.html

Velocity tends to decay due to drag, so I will have a play with these settings. I was however surprised by the statement

The value is not usually set directly but rather by using forces.

Hass anyone tried using Rigidbody2D.Addforce in replacement of .Velocity? Just a thought at present.

yeh I turned on friction and then added force in Y -> but add force is rather subtle so for just one push it needs to be pretty big but I tried using that to give it a push if y velocity dropped too low and it worked. If you leave it on the force starts to build up and its like a strong wind blowing , fun. Btw friction doesnt add much in playability BUT I start with torque on the ball and you need friction so rotation changes on impacts.