Search Unity

[RELEASED] Complete Physics Platformer Kit

Discussion in 'Assets and Asset Store' started by Greg-Sergeant, Oct 2, 2013.

  1. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    I'm having quite a bit of fun with this kit :)





    Maddddddd props to DanielSnd!
     
    Last edited: Oct 3, 2014
  2. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    140
    Thanks for the answer! Alright, I think I'd like to add that to my feature request list then, allow jumping while sliding could be an option in the Player script. Would be very cool!
     
  3. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi, from a long time, i m back.

    script Health.cs

    add this code under the line 103:

    Code (CSharp):
    1. rigidbody.angularVelocity = Vector3.zero;
    +++
     
  4. Taran858

    Taran858

    Joined:
    Sep 3, 2014
    Posts:
    2
    I was having issues with the floor checks not detecting if the player was grounded when the centre of the player was not over the floor, instead only part of the character was.

    Turns out that was not using the floor check positions to ray-cast down but rather ray-casting down from the centre of the of the player.
    It this intentional or a bug?

    Cheers
     
    Last edited: Oct 4, 2014
  5. Neoshiftr

    Neoshiftr

    Joined:
    Dec 5, 2012
    Posts:
    67
    I saw an issue when you jump up straight walls. You can jump higher if you stand in a corner between two walls and "slide up the wall".
    Anyone knows how to fix that?
     
  6. Taran858

    Taran858

    Joined:
    Sep 3, 2014
    Posts:
    2
    There are a couple ways to handle this that I know of.

    One is to make the walls kinematic (this might cause other issues though).

    If it is due the floor detection, setting layer on walls to IgnoreRaycast might help.

    The third was is to ray-cast out around the player to the sides to see if next to wall and if so push away from it. That way you are not touching so cannot "climb". This might also be able to be done with a collider.
     
  7. Fowi

    Fowi

    Joined:
    Dec 2, 2013
    Posts:
    30
    I have this issue too, jumping in the corner... Nobody can solve this.
     
  8. Neoshiftr

    Neoshiftr

    Joined:
    Dec 5, 2012
    Posts:
    67
    None of them worked.
     
  9. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi Daniel,

    I have a little request. If i run the kit in 2D mode, i have a problem with avatar position when it use ladder.
    My question: can u update the script for forcing Y rotation to 0° ie the gamer sees the back when avatar use ladding.

    OR

    we can fix the core game for sidescroller. If i push UP ARROW, avatar make a rotation to 0° and gamer sees the back of avatar.

    regards.

    i love your addons :)

    ++
     
    Last edited: Oct 5, 2014
  10. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    i think it is not good idea to destroy / kill pickup object because it serves for gameplay.

    I have updated ScriptProjectile.cs at line 50.

    before:
    Code (CSharp):
    1.         if(other.gameObject.tag!="Player" && !other.isTrigger) {
    now:
    Code (CSharp):
    1.         if(other.gameObject.tag!="Player" && other.gameObject.tag!="Pickup" && !other.isTrigger) {
    The next is string option (the script will be more dynamic with this option) in ScriptProjectile.cs.

    +++
     
  11. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Anyone else used the Realistic Effects Pack with Daniel's Projectile shooter script?

    It shoots out, and it bumps the enemy, and on very rare occasions it seems to do damage, but it's incredibly inconsistent for some reason.
     
  12. pfisher1

    pfisher1

    Joined:
    Sep 10, 2012
    Posts:
    2
    When the Player jumps, I would like the camera to NOT move along the Y axis. Basically if I could only have the camera follow the X and Z axis of the Player and exclude Y, that would work. I have spend hours trying to get this working. Does anyone know how I can implement this?
     
  13. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi Greg,

    When is next update and change log ?

    +++
     
  14. will_brett

    will_brett

    Joined:
    Feb 16, 2013
    Posts:
    208
    Can this kit be used with unitys 2D stuff. I know you can make the 3d stuff sidescrolling but would be cool if this worked with 2d colliders , 2d rigid bodys and sprites
     
  15. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    i would like to get coinsCollected value from GUIManager.cs.

    In a news script with isTrigger event, i log the value. See below the code:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class exitlvl : MonoBehaviour {
    5.  
    6.     private GUIManager guimanager;
    7.     int valueCoins;
    8.  
    9.     void Start()
    10.     {
    11.         guimanager = GetComponent<GUIManager>();
    12.         valueCoins=guimanager.coinsCollected;
    13.  
    14.     }
    15.  
    16.     void Update()
    17.     {
    18.  
    19.     }
    20.  
    21.     void OnTriggerEnter(Collider other)
    22.     {
    23.  
    24.         Debug.Log(valueCoins);
    25.  
    26.      }
    27.  
    28. }
    but debug log return 0 in coins value.

    Any idea to get the value of coinsCollected are welcome :)

    Regards.
     
  16. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    has anyone has a solution to get the value coinsCollected ?

    Regards,

    ++
     
  17. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    Is the exitlvl script on the same game object as the GUIManager script? If not, you'll need to either find the object with the GUIManager script or manually assign it in order to pull the coinsCollected value from it.
     
  18. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi Sir,

    omg , Coin is a pilar of this framework and no way to retrieve the value of coins collected easily oO

    ++
     
    Last edited: Oct 8, 2014
  19. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    tequyla likes this.
  20. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    I have following this way yet.

    My apologie. I have forgot the update functionin my new script.

    For retrieving Coins collected, the way is:

    add in Coin.cs:

    Code (CSharp):
    1. public static int toto = 0;
    and update CoinGet() in Coin.cs:
    Code (CSharp):
    1.     void CoinGet()
    2.     {
    3.         if(collectSound)
    4.             AudioSource.PlayClipAtPoint(collectSound, transform.position);
    5.         if (gui)
    6.             gui.coinsCollected ++;
    7.             toto=gui.coinsCollected; // patch for retrieving coinsCollected  
    8.         Destroy(gameObject);
    9.     }

    and collect the coinCollectd in new script with name has you want:
    (I use trigger for calling value of coinCollected)

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class exitlvl : MonoBehaviour {
    5.  
    6.     public static int valueCoins=0;
    7.  
    8.     void Start()
    9.     {
    10.         valueCoins=Coin.toto;
    11.     }
    12.  
    13.     void Update()
    14.     {
    15.         valueCoins=Coin.toto;
    16.     }
    17.  
    18.     void OnTriggerEnter(Collider other)
    19.     {
    20.         Debug.Log(valueCoins);
    21.     }
    22.  
    23. }
    it 's not perfect but it allows me to continue my tests.

    thanks Besus for the way.

    ++
     
    Last edited: Oct 8, 2014
  21. Yog-Shoggoth

    Yog-Shoggoth

    Joined:
    Mar 23, 2013
    Posts:
    13


    Finally got the wall jump/wall-kick implemented following Besus's approach. Also added a few other bits and pieces such as an air dash and a ground dash, although they lack animations so look a bit odd o_O.

    Next up a ground stomp and wall running.
     
  22. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    How did you make the level? Probuilder?
     
  23. Yog-Shoggoth

    Yog-Shoggoth

    Joined:
    Mar 23, 2013
    Posts:
    13
    It was built using Prototype, which is the basic/cut-down version of Probuilder. Which appears to still be free on the Asset Store (https://www.assetstore.unity3d.com/en/#!/content/11919) for the moment, even though that promo was only supposed to run during September.
     
    pushingpandas likes this.
  24. Fowi

    Fowi

    Joined:
    Dec 2, 2013
    Posts:
    30
    Excel.lent for you, but... I get the another atention about your video. how did you implement the wall transparency? the main camera of complete physiscs platformer kit didn't act like this.
     
  25. Yog-Shoggoth

    Yog-Shoggoth

    Joined:
    Mar 23, 2013
    Posts:
    13
    The wall transparency effect is provided by a combination of a custom script on the camera and a custom shader. The camera script detects when there is an object between the camera and the player and then invokes the custom shader that renders the blocking object transparent.
     
    Fowi likes this.
  26. Mad_Fox

    Mad_Fox

    Joined:
    May 27, 2013
    Posts:
    49
    Hi guys, my character doesn't jump when going uphill, generally when i try to go up high angle slopes and the character is sliding down, anybody know how can i make my character free to jump anytime?
     
  27. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    Try adjusting your "floor checker's" as they likely aren't registering you as being grounded (preventing you from jumping). Make sure that they aren't too too far away from your character or else they will register over a gap and return false to the grounded bool.
     
  28. Mad_Fox

    Mad_Fox

    Joined:
    May 27, 2013
    Posts:
    49
    Thanks Besus, but that didnt work for me, i was messing with the PlayerMove script, and changed the check to jump, from "if (grounded && slope < slopeLimit)" to "if (grounded)", and that was it, it's moving and jumping how i want it
     
  29. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    If that resolved it, you likely had your slopeLimit variable set too low (meaning even slight inclines were above the slopeLimit). Be warned that now the player will be able to jump even when they are supposed to be sliding down a steep slope. :p
     
    Mad_Fox likes this.
  30. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Has anyone used this for FPS? I turned off the character and tweaked the Z offset, from 5 to 2.
    It works really well actually for what I need, except my rotation is offset due to it being for 3rd person.
    Is there a way to ignore the offset between the player and camera and just treat it as an FPS camera at the same origin as the character? The Z offset works until about 1.8, maybe I'm missing a setting...mainly i need the collision to be at the center of my camera/fps player
    thanks!
     
  31. Banksy

    Banksy

    Joined:
    Mar 31, 2013
    Posts:
    376
    Just purchased... trying to load up into Oculus Rift
     
  32. Yog-Shoggoth

    Yog-Shoggoth

    Joined:
    Mar 23, 2013
    Posts:
    13
    Been playing today with implementing a system for revealing hidden platforms when the player meets certain criteria. At the moment it's toggled by key presses.

     
  33. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    OMG Yog! Please make a tutorial how you did that!! Thats massive!
     
  34. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    anyone has trying to introduce rope in kit ?

    Regards,

    ++
     
  35. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    I was considering climbable poles as my next possible venture but for ropes, I believe the existing "pushable" tag might work since it does create a joint on grab. You would just need to create a rope that responds to physics and momentum.
     
  36. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi Besus,

    pushable is a good idea. I will try tu build a rope with character joint, hing joint, etc..

    but, if someone has build it before me, you are welcome :)

    ++
     
  37. Yog-Shoggoth

    Yog-Shoggoth

    Joined:
    Mar 23, 2013
    Posts:
    13
    Is this the sort of thing you were looking for?



    Obviously this is a pretty rough setup and I'm sure it could be improved upon. At the moment the rope doesn't really respond to momentum, the movement in the video is being created by moving the player left and right.
     
  38. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335

    yes, i m looking for :)

    can you post the script ?

    +++
     
  39. dragonstar

    dragonstar

    Joined:
    Sep 27, 2010
    Posts:
    222
    hey guys where is that tutorial to change the input for mobile devices ?
     
  40. Banksy

    Banksy

    Joined:
    Mar 31, 2013
    Posts:
    376


    ROPE Bridge...
     
    DrewMedina and snowcult like this.
  41. chavika

    chavika

    Joined:
    Jan 24, 2014
    Posts:
    1
    Great Kit! Just wondering if you could provide a changing the player tutorial. Can not figure this out with Mechanism.
     
  42. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    My research for building a rope. I use Character Joint (from unity3D) without script.

    One of these is tagged with Pickup properties but the comportement is strange when avatar picks the rope, at the moment.

    in progress.

    +++
     

    Attached Files:

  43. BioFan

    BioFan

    Joined:
    Mar 4, 2013
    Posts:
    24
    Just got this kit :)
    was trying to do rope, ledge hanging and climbing, anyone can help?
    I'm a artist and has little programming skill. But this kit is so awesome I can get it to work in minutes.
    Sadly seems like the developer is not updating it huh?

    And thanks to Daniel for the awesome custom scripts. A question, for the double jump, how can I assign a new animation to that specific jump?

    But seems like there is a nice community here with this kit, hope will be an acquaintance to all of you here. Cheers
     
  44. Mad_Fox

    Mad_Fox

    Joined:
    May 27, 2013
    Posts:
    49
    Hi, im having a weird issue, when i start a scene with enemies, they react normal, when they see me, they chase me, i use a hub world with enemies as that scene, when i enter a level in that scene, clear that level, a get back to my original scene with enemies, they just patrol and didnt see me, they work fine, just that they seem to not see me, so no chase at all. what could be happening? Thanks!
     
  45. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    433
    Hello,

    Thanks for providing us with such a great asset :) I was wondering how would I go about setting the coin value to an NGUI progress bar/slider ? Not the label/text but a fill area.
     
  46. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    Then that means one of the criteria in the EnemyAI script isn't being met; likely the 'colliding' bool in the TriggerParent script. Enable debug on the Unity Inspector and see if that bool on the enemy object in range of the player is being set to true or not. That's at least somewhere to start (and assuming you're not persisting data from one scene to the next).

    The coin value is just a standard public int in the GUIManager script. If you're unfamiliar with translating that to an NGUI slider, I would suggest watching their tutorials and/or asking how to do it on their forums.
     
  47. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    433
    Yes that's what I figured, when I set it up everything looks fine but when I run the scene the slider doesn't update.
    I have watched a bunch of tutorials so far and none of them have really helped.
     
    Last edited: Oct 17, 2014
  48. Mad_Fox

    Mad_Fox

    Joined:
    May 27, 2013
    Posts:
    49
    As always, thanks Besus!, i've checked as you said, the first time in the scene the "bool" variable "colliding" works, it change it state to true, assign the tag PLAYER as his "hit object" and the enemy chase me, after y change scene, and then change again to this scene, the variable doesnt change, i checked everything, i dont know why its working the first time and doesnt the second, i did not use persisting data, i just change level with Application.LoadLevel(0);
     
  49. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    433
    Ok I got it working but I had to make modifications to the GUIManager and Coin scripts, perhaps something to add in for future use for the others :)
     
  50. BioFan

    BioFan

    Joined:
    Mar 4, 2013
    Posts:
    24
    May I have this script? I just need the char to grab and climb when user press up :)