Hey guys, welcome back to Rocket Science.
We're going back to physics in this episode.
You guys voted on twitter and "Ball physics"
won the poll so lets talk this topic through.
First we need to talk about units.
The engine uses a custom unit to measure distance.
The Unreal Unit.
You already know this unit from your camera
settings.
100 height means that the camera is 100 unreal
units above the ground.
If you don't want to get spoiled about the
Rocket League lore you might want to stop
watching now because I'm about to reveal the
size conversion that the game uses.
Alright?
1uu is equal to 1cm.
I will be using the unreal units in this video
because the values make the most sense but
I'll put the conversions on screen whenever
possible.
There are some boundary values in the Rocket
League physics.
The ball and car both have a maximum speed
at which they can go.
For the car this is 2300 uu/s and for the
ball it's 6000 uu/s.
The maximum spin that the ball can have is
also limited to 60RPM or 1 full turn a second.
Another important number is the gravitational  
acceleration.
It is 650 uu/s² which is 2/3
of the gravity on earth.
This means, whilefalling, the ball will increase it's speed
downwards by 650 uu/s every second it's falling.
So how does the ball behave once it's in the
air? Air resistance does not work like it
does in real life. Spin doesn't affect the
ball while it's in the air. The ball does
slow down however. It will lose 3% of it's
speed every second or in other words it will
half it's speed every 22 seconds. Obviously
it will never be in the air that long so we
can conclude that waiting for the ball to
slow down significantly when it's in the air
doesn't work.
On the ground there is some sliding friction
on top of this. It slows the ball at a rate
of 230uu/s². Because the ball can't spin
faster than 1 round per second it's not fast
enough to roll without sliding unless the
ball moves at a speed of less than 1 time
it's perimeter per second which is around
565uu. So once it gets that slow, there will
be no sliding friction and the airdrag gets
counteracted by the rotational energy. The
ball only slows down about 2.2% per second.
If the ball has sidespin it will also have
a much bigger impact at those low speeds.
When the ball moves at a speed of less than
40uu/s for 2.5 seconds and has a spin of less
than 10 RPM it will just stop. If you can
get it to spin perpendicular at a higher rate
than 10RPM it will never stop. The horizontal
speed should never reach 0 either but at some
point the ball will keep the same position
because of rounding errors in floating point
arithmetics.
Before the ball goes sliding or rolling on
the floor it will have to bounce first. I
need to clear up a common misconception right
here. Many think that the angle of incidence
has to be the angle of reflection on a bounce
without spin but that is unfortunately not
the truth. This happens with light but with
a normal ball you have friction and the strength
of reflection to consider.
You can split a bounce that is coming in at
angle into two different components. One is
parallel and the other one perpendicular to
the wall. The physics of the latter are really
easy to explain. In Rocket League you will
always get back 60% of the perpendicular momentum
in a bounce. This means if the ball is coming
in with a perpendicular momentum of 1000uu/s
it will have 600uu/s in the opposite direction
after the bounce.
Sadly you can't calculate the parallel compenent
this easily. Friction depends on the perpendicular
force, and the spin of the ball can affect
the bounce to some degree.
What will hopefully help you alot more than
a formula is explaining the general idea.
Since more perpendicular force will increase
friction, a shallower angle also means less
friction. So if a ball is moving down the
field and just barely touches the wall the
parallel speed will decrease less than it
would if it bounces at a 45° angle.
Now let's get to arguably the most important
part. The car-ball interactions. The ball
doesn't actually interact with the model of
the car. All the cars have a seperate hitbox
in the shape of a rectangular cuboid. The
slope of the octane is just for the looks
and doesn't do anything to the ball. That's
not all though. Rocket League has another
anomaly that you wouldn't expect. In real
physics when the ball bounces on a surface
like the cars roof there is something called
the impact normal which is perpendicular to
the surface. The ball would behave the same
way it would with a wall bounce given the
angle to the impact normal. In Rocket League
the impact normal isn't perpendicular to the
surface. Instead it points from the center
of mass of the car to the point of impact.
This was done in order to make hits more consistent.
The real world impact normal changes drastically
on an edge which would make those touches
almost unpredictable.
What does that mean for the ball though? A
real-life object where every impact normal
points from the center of mass to the surface
is a sphere. Given an impact point on the
car we can extrapolate the position on a virtual
sphere and predict the bounce based on that.
Essentially it becomes a game of pool with
the only differences being that that not all
the balls are the same size and the car is
10 times the weight of a ball. An implication
of this is that it's impossible to have a
ball resting completely still on a car. That
might seem bad at first but it's actually
what gives you the control needed to balance
the ball on your roof. Increasing speed, decreasing
speed and turning would usually not be possible
with a flat shape. If you're new to dribbling
try to picture your car as a sphere. The balancing
act is pretty much the same as 2 spheres stacked
on top of each other.
Okay, direction is one thing but how do we
hit it with the most power possible. You've
probably heard somewhere that you should hit
the ball with the front of your car. Why is
that? The front of your car is not inherently
more powerful. You can actually hit the ball
with the top of the car for the exact same
power. The power is determined by combining
3 things. The speed of the part of the car
that hits the ball, the impact normal and
the center of mass of the ball. In order to
get the most power you want them all to line
up. The speed of the part of the car that
hits the ball going in the same direction
as the impact normal and both pointing straight
through the middle of the ball. Knowing this,
it's pretty easy to explain why you usually
want to hit the ball with the front. Say the
car is traveling in the direction of it's
roof. If you don't get the touch on the ball
perfectly above the cars center of mass then
nothing is going to line up. Because of the
shape of the hitbox the front is much more
forgiving. Add to that the fact, that your
boost is at the end of your car and that there
is no flip that goes towards your roof and
you get the reason as to why you almost never
see an insanely powerful roof hit.
There is another part of your car though.
The wheels. They have a seperate hitbox that
is connected to the rest of the car. If you
look at the cars model you can see that the
wheels are not in a fixed position. The same
seems to be true for their hitbox. When you
hit the ball with them they work like shock
absorbers which is why wheel hits are usually
very weak.
Alright that's going to be it for this video.
I've decided that I want to cover redirects
and pinches in an extra video. If you have
any further things you would like me to test
regarding ball physics please tell me so I
can add them to my list. If you want to stay
up to date please go follow my twitter.
