Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How can I add rocket jumping to my Unity game?

Discussion in 'Getting Started' started by XXXRocketJump69, Feb 16, 2020.

  1. XXXRocketJump69

    XXXRocketJump69

    Joined:
    Feb 16, 2020
    Posts:
    2
    Supposing I am creating an FPS game in the style of the old Counter Strike (just an example), how can I add the function of rocket jumping to the characters?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    It is impossible to guide you, not knowing what you know. What have you actually tried? Have looked tutorials?

    The easiest answer would be AddForce to RigidBody.

    But if you also mean character animations etc., that another story, which is much more complex.
     
  3. XXXRocketJump69

    XXXRocketJump69

    Joined:
    Feb 16, 2020
    Posts:
    2
    Well, to tell you the truth, I just got started after I bought a Udemy course, it’s because I can’t add my tags in this post for some reason, it says they don’t exist. I just got so curious that I had to ask how to add this thingamabob anyway.
     
    Last edited: Feb 16, 2020
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    I have no idea why you bought udemy courses, before trying first, what is for free. There are tons of good resources out there.

    Anyway, go through tutorials. Learn to use documentation. Learn to debug. Learn to game design and how game works. You need of course learn how to program in C#, if you don't know that part as of yet.

    First, make something moving, before you consider even jump.
    While you can jump directly to 3D, I strongly suggest focus at the beginning on 2D.
    Having 2 axis to deal with, is much easier to grasp things, how they work for starters.
     
    JoeStrout and koirat like this.
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,966
    Wasn't the rocket jump the idea that you shot a rocket and the recoil would push you backwards? Or was it the explosion pushing you? Either way you basically need a script that checks for either the gun firing or the rocket exploding (depending on the way you want it) and when that happens add a bit of force to the player in a direction away from the rocket.
     
    Last edited: Feb 17, 2020
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    In games like quake, Unreal, it was the explosion. So need to know, how close is player to explosion.
    Then need apply opposite force vector, in respect to explosion indeed.