Rocket Science Homepage

Maximize Shot Power - Rocket Science #20

Published:

Would you like to load embedded YouTube content?



* required

Transcript

Introduction

Hey guys HalfwayDead here with another episode of Rocket Science. This time, we're taking a look at how to hit the ball with maximum power. When it comes to the hit physics of Rocket League, there is a lot of wrong information out there, but even more half truths and rules of thumb that break down completely in some situations. Unfortunately, some of that information was published by me. That's why I'm here to tell you what of the information out there is correct, and how it all ties together.

A Bit of History

It all started quite a while back, when Psyonix Developer Corey Davis gave a talk at Game Developers Conference 2016, in which he mentioned that Rocket League intentionally uses fake hit physics because it captures player intent better than realistic physics, which can seem random. He gave a very rough description of how they're using an artificial hit direction from the center of mass of the car towards the ball.

So on the left, you see a rough simulation of: if I hit the ball with my fender, it's going to bounce off at what's called the impact normal at some speed based on me, and how fast I'm traveling, the ball is traveling, in what direction. And that doesn't seem that bad, right? It's somewhat predictable where it's gonna go. But then, when you look at how our physics works on the left right, where we look at the vector between the ball's location and the car's location, it's almost always going in the direction that your camera is looking. So it's very predictable, right? Like, it's consistently: if I want to hit the ball towards the goal, I'm going to align myself between the ball and the goal and hit it. And it makes the game a lot easier to pick up and play, and it also makes high-level play much more consistent.

— Corey Davis, Rocket League: The Road From Cult Classic to Surprise Success, GDC 2016

For episode 4 of Rocket Science in which I also tried to cover the ball hit physics, I set up a couple of experiments trying to test the statements made by Corey, as they didn't seem to accurately reflect my personal observations of what happens in the interactions. Regardless of my hunch, I was surprised to see that the experiments did indeed violate the given information from a developer. Specifically, balls were going in directions that the center of mass model didn't predict. Back then - in episode 4 of Rocket Science - I gave my own interpretation of what I thought Corey must've meant. However, I made an error. My interpretation couldn't explain the experiment either. In my attempts to correct this mistake, I contacted Corey directly and asked if there were any details he had omitted in his talk. He gave me a full breakdown of the fake physics which I have relayed in episode 6. However, there is a still a missing bit of information there.

Rocket League doesn't use fake physics instead of real physics. It adds the fake physics on top of a normal physics engine that emulates real physics.

So we actually need to understand both parts to know how to shoot the ball with power.

The Fake Physics

Let's start with the easy part. The fake physics. The strength of this force gets bigger, the higher the relative velocity between the car and the ball gets. That means if you're going towards the ball at a high speed, or the ball is coming towards you at a high speed, the applied force will be high too. As a result the absolute maximum strength you could get out of this force is when you're going directly at the ball at full speed, and the ball is traveling right towards you. When you see this example, it doesn't look like a very powerful shot, but there is a simple explanation for this. The ball had to change its direction by 180° and now goes in exactly the opposite direction of where it came from. Since it was so fast before we need a really large force just to change its direction. So this example serves to show that a large force doesn't necessarily mean a high velocity shot.

But we can modify the situation by only a single aspect to get a really, really fast ball. The difference is the point of contact between the ball and car. When the ball touches towards the rear of the car and we apply the rule of the hit direction being from the center of mass towards the ball, then the same force we previously had, gets applied in roughly the same direction that the ball is already going in. And then, well... you get quite the doink. That is the best example of the fake forces in action, but the same idea applies to redirects and shots from lateral passes. It's the reason why those kind of shots can easily reach 140+ kph while regular power shots don't go much beyond 120.

The Physics Engine

Let's turn off the fake physics for a second, to see what the physics engine does. It simulates a perfectly inelastic collision between the ball and the car. Sounds complicated, but the concept is quite easy to grasp. It just means that the collision doesn't have any bounciness and the objects both travel at the same speed afterwards. When adding rotations, the objects themselves don't have the same speed after the collision, however, at the very moment where they do collide, the point of collision has the same speed for both objects. We'll come back to this idea later for the explanation of how to maximize the power of shots.

Now you might be wondering which of the forces is more important, but there is unfortunately no real answer to that as it highly depends on the situation. In this doink for example, the realistic physics will not increase the velocity of the ball at all. Rather, they'll actually slow it down due to friction. If we turn on the full physics, however, the speed will increase because there is a relative velocity between the ball and the car, and the ball impacts the car such that the custom hit vector points in the right direction to add more speed to the ball. An example of when the physics engine is more important is when the ball isn't moving at all. In that case, the relative velocity between the 2 objects is generally not that impressive. As such, in this specific shot, only 40% of the force came from Psyonix' added physics.

Putting it into Action

So we've established how the physics work, but not how we put that into action. Well, duh, obviously you dodge so your car spins fast and you hit the ball with your corner, because that is the most powerful part of the hitbox. Would that be your answer? There are good reasons to dodge and hit the ball with the corner, but the common explanation you hear is wrong.

Why do I care? Because there are situations where you won't get any extra power from doing either of those things.

To understand the full extent of the realistic physics, we need to talk about the moment of inertia. Don't run away, I'll explain it as simple as possible. Inertia is the resistance of an object to change its velocity. A heavy object requires a lot of force to move. The moment of intertia is the same thing, but for rotations. An object with a large moment of inertia requires a large force to start spinning. The moment of inertia is a result of how heavy the object is, as well as where in the object the mass is located.

Let's picture a collision of an object with the ball at an angle. On impact, the theory tells us that the velocity of the colliding objects at the impact point has to be identical. But there are a lot of different ways this constraint can be met. For example, the object could have a lot of its mass at the outer ends. Then it would be hard to get it to rotate, and the ball would have to get up to speed to meet the constraint. Another possibility would be that the object has most of its mass at the center, making it really easy to rotate. Then, the ball barely has to move at all to meet the constraint.

If we have these objects spinning towards the ball, then we'll make the ball go faster after the impact. This is, however, way more effective with the first object due to its mass distribution. The 2nd object is just too easy to rotate.

A much more effective hit for the 2nd object would be to fly at the ball with the long ends in line with the ball surface. This way, the object can't spin to meet the constraint and we get the ball to move faster.

I showed these 2 extreme examples, because it seems most people treat RL cars like they match the first. The truth is, of course, somewhere in between.

The rotation from dodges is absolutely not useless, but you can get the same power, if you line your car up correctly, and don't dodge. I've determined this experimentally, trying to set up a ton of different dodge scenarios with the longest car in the game, and was unable to exceed the power of a perfectly lined up no dodge shot by more than 1%. This would be a lot different if the cars could spin faster, but they don't.

Why Dodge?

So why does every good player dodge on the majority of shots? For that there are 2 reasons. The first one is quite obvious if you know how dodges work. When you dodge, the car gets extra speed. I won't go into the numbers here since I already have a video on dodges that goes into great detail. The exact amount doesn't matter though. What we want to carry away from this, is that if your car is going faster, it will likely have a higher relative velocity towards the ball, which increases the shot power.

This aspect alone means that whenever you're significantly below the max speed, dodging is worth it. There is another reason though why you might even want to dodge at max speed. It's just not always easy to line up your car perfectly the way you'd need to without dodging. If you didn't do a good job or the angle was simply impossible, you'd rather have a dodge than none.

What I actually want you to take away from this, is, that you shouldn't dodge for the sake of dodging because if you have the perfect line and speed you can get just as much power without it.

Corner Hits

That leaves the other tip that players tend to give. Hit the ball with the corner of your hitbox. Again, this rule oversimplifies things, and if you think that boomer that you had last game would have been even more powerful if only you hit it with the corner, you'd probably be wrong.

Let's look at why the corner is better most of the time. Here, the car is on a collision course with the ball, once it hits it, the car starts to spin clockwise due to where it was hit. This means the ball doesn't have to move as fast to stay within in the contstraint that the velocity of both objects at the contact point has to be identical.

Let's rotate the car before the touch and try again. This time the car spins less and we get more power. The reason we didn't chose an angle where the car doesn't spin at all is because then the ball gets hit in the wrong spot and it will start spinning. We need to find a middle ground.

This is pretty much always on the corner, but there is a clear exception. If your center of mass is travelling exactly towards the location of the balls center, then a flat surface will probably be easier to align than the corner. You can also hit the ball with a flat surface not centered, as long as you make sure the dodge counteracts any rotational force that is acting on your car.

But what about dodges? Don't we get a longer lever diagonally and therefore more power? Yes, in theory, but in practice this difference which I've tested experimentally ended up making a difference of about 1%. However, diagonal dodges also increase the car's speed slightly more than straight dodges. This difference only matters when the car is going slower than 78% of the maximum speed though.

Flip Cancels

What about flip cancels? One of the common arguments I've heard for them is that they will give you more power. But our knowledge gained throughout this video should make it obvious why that is only true in very specific situations. If you're canceling your flip then you're just reducing how fast your car spins, and all other things being equal, this will actually give you a bit less power.

Flip cancels are for the case that you overrotate the car such that you end up getting a strafe hit on the ball. If you manage to slow down the rotation with a flip cancel, you might be able to stop overrotating. This will result in an overall more powerful shot. This is only relevant when you're dodging while being a good distance away from the ball. If you hit the ball 50 ms or less after your dodge, flip cancelling does not have any effect on the shot, only on your recovery.

Flicks

One last thing we have to cover are flicks. These are very hard to analyze from a scientific standpoint. If we try to repeat the same experiment and move the ball by only a slight distance, it can completely change the outcome of a flick. Because of that, I tried my best to analyze what's happening by gathering data while controlling the car myself. To do this, I made the game spit out the velocity of the ball whenever any touch increased it. This gave some very helpful indications on what constitutes a good flick.

Once the flick starts, each touch on the ball increases the velocity significantly. There is definitely some room for better and worse flicks with the same amount of touches, but the flicks that only do one touch never end up being really powerful.

Our goal with flicks should therefore be, to let the ball roll over the car's roof during it. If we don't let it roll, but let it bounce away instantly, the car will never catch up to it to make further touches.

Longer cars simply make it easier to get those extra touches. But what about the fact that they provide a longer lever, doesn't that just add more power by itself? For the fake physics that Psyonix added, it doesn't matter, but for the physics engine it does. Unfortunately it's simply impossible to set up the "same" flick on 2 different hitboxes, so all I can provide is a rough average difference on flicks with 2 touches. The difference in my trials was around 5% between the shortest hitbox, Octane, and the longest, Breakout.

If we need the extra length, we can use a trick though. Turn the car by 180° and do a backflip. To be fair we don't have to actually turn around 180°. Any kind of diagonal twisting backflip flick should on average perform better than a frontflip flick.

This is simply due to where the hitboxes have their center of mass. All cars have their center of mass shifted towards the back of the car, making the part of the car where the ball rolls over during frontflips shorter, than the part of the car which we use in a backflip flick.

Aside from the fact that a backflip flick requires some twisting and turning before you can execute it, it's superior. For example, on the Octane I personally wasn't able to get any frontflip flick with 3 touches at all, but with a reverse flick, it was very doable.

Summary

Alright then, I think it's time for a summary of the most important parts.

For maximum power:

  • Go towards the ball with maximum speed.
  • Line up the car so the momentum goes through the center of the ball.
  • If you are off axis, use flips, flip cancels, and air roll to rotate the car into the ball.

For flicks:

  • Try to roll the ball smoothly off the roof to get as many touches as possible.

The tool that can show shot strength will be released as a BakkesMod plugin. Link here in the video description.

Outro

Shoutout to my patrons who support me financially. If you found this video helpful, please share it. To stay up to date, follow me on twitter or join my discord and I'll see you soon for the next video.