UDON Rocket Jumping World

I made a world that uses UDON to apply forces similar to Rocket Jumping in Team Fortress 2.
dir is the normalized direction to the player from the rocket hit point. PlayerPushForce is just a float that is equal to 9. The rest is just from trial and error.

            FinalAddition = dir * PlayerPushForce * Mathf.Clamp((2 * Mathf.Sin(0.6f * dist) - 0.2f * dist + 0.5f), 0, 50);//Sin curve
            localPlayer.SetVelocity(localPlayer.GetVelocity() + FinalAddition);//Add to players velocity

I used a Sin Curve to make a similar effect that TF2 rockets give. When you are too close you will get a smaller jump than if you were at a specific distance. This allows players to learn about the correct distance to max out your rocket jump. There is a course with a time trial that I added. Right now the fastest time is 22 seconds. Later I want to add similar strafing to tf2.

1 Like