Search Unity

Creating a JumpPad for a Rigidbody FPS Controller in C#

Discussion in 'Scripting' started by dann96, Apr 25, 2015.

  1. dann96

    dann96

    Joined:
    Dec 6, 2014
    Posts:
    113
    I've asked this at least twice before, but no one has been able to help me yet.

    I want to make a jump pad the launches the player upward. How on earth can I do this with a Rigidbody FPS Controller? All I know is that I need to use OntriggerEnter.
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
  3. dann96

    dann96

    Joined:
    Dec 6, 2014
    Posts:
    113
    The bigger problem is that I don't know how to go about applying the addforce at all. I'm pretty much stumped on how to make a jump pad at all. All that I do know is that I want the player to walk into the platform's trigger collider which will then send the player upward through the use of the rigidbody.
     
  4. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Well you've got the logic correct, so what aspect are you struggling with via code? What have you written so far?

    The documentation I linked you to shows you how to retrieve the Rigidbody component and use AddForce.
     
  5. dann96

    dann96

    Joined:
    Dec 6, 2014
    Posts:
    113
    I finally figured it out: I was using AddForce when I should have been using Velocity.