Search Unity

Bounce pad script

Discussion in 'Scripting' started by PhantomFleece, May 29, 2015.

  1. PhantomFleece

    PhantomFleece

    Joined:
    May 29, 2015
    Posts:
    2
    Hi im fairly new to unity and i was wondering if someone could help. I am currently working on a 3D platformer and am having a lot of difficulty making a bounce pad script which will allow the user to be sprung into the air once jumped on. Like i said im fairly new to unity and scripting so any help would be greatly appreciated.
    Many thanks
     
  2. chubbspet

    chubbspet

    Joined:
    Feb 18, 2010
    Posts:
    1,220
    There are different ways to approach this. It is a bit more complex than you might initially think, since you need to chack various things of the jumping object. For example, you need to check if that object is moving in a downwards direction at the time of collision. Once you checked that, you can place a box collider above it's head and when a character enters this collider(set as trigger) you can apply an upwards force.
     
    PhantomFleece likes this.
  3. PhantomFleece

    PhantomFleece

    Joined:
    May 29, 2015
    Posts:
    2
    Ok i think i understand, Thank you for the reply ill give it another go and see if i can make it happen :)