Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

[RELEASED] Complete Physics Platformer Kit

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

  1. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    I updated the kit for Unity 5 with many bugfixes for which everyone on this forum has been invaluable! (should be approved by the unity team shortly) Two things were sacrificed: the player rotating to face pushable objects and breakforce on pushable objects. I'm hoping these are fixed in future unity patches because it seems to be the new physics system causing these, i think there are still some teething problems in unity 5 which i was hoping to wait out (worked well for the 5.1 update fixed a bunch of stuff) but didn't want to wait any longer before updating..

    Besus i played your demo, amazing work, i'm glad you could build on top of this to add more features to the core! It would be right at home on a PS1 demo disk back in the day.. crazy that talented solo devs can do an entire teams work now.. Daniel, i included an additional text file in the kit which directs players to your additional modifications, which seemed smarter than including them in the kit itself (directs more users to the forum which = more modifications and discussion). Frederick your stuff always impresses me, i had in mind from the beginning that people could use the dynamic features of the kit in very crazy modular ways to get new results with no (or little) extra coding - your work on the different enemy AI and co-op features is awesome, very cool to see!

    Thankyou! (i do check in here from time to time, but i feel i've released my baby into the wild and aside from answering customer support, i generally keep my distance and let the community roam free)

    I've also spotted a few games that use this kit get greenlit on steam greenlight which is fantastic.

    remember you can email me about anything at: greganims1 [at gmail . com]

    Thankyou! This community has grown so much, i love seeing people share extra code bits, mods, videos of their game and progress, also it is really nice for me to hear that this kit got some people into gamedev and unity. That is the most rewarding thing for me to hear.
     
  2. kyleyoungblom

    kyleyoungblom

    Joined:
    May 1, 2014
    Posts:
    16
    Awesome, looking forward to checking out the bugfixes, Greg!

    I'm trying to create a "teleporter" that moves a player from A to B. I want to disable player input upon teleportation and force the player to "walk" a few units in the direction of destination.transform.forward. Specifically, I'm trying to make a door from my main outdoor level to an indoor space like a house or cave. When the player triggers the door/teleporter, they're moved to an indoor set and we see a brief shot of them walking through a doorway). This is roughly what I'm trying to accomplish (without the door animation):

    I have it set up to reposition/rotate the character to orient to the new "doorway", but for some reason my character keeps moving in the direction they were walking when first teleported. I've tried disabling PlayerMove as well as setting the playerMove.direction and playerMove.moveDirection vectors to 0 but it doesn't work. Any ideas?
     
    Last edited: Sep 8, 2015
    dragonstar likes this.
  3. devunit

    devunit

    Joined:
    Jan 29, 2014
    Posts:
    20
    Hi. After changes i have this errors... How can fix it?

     
  4. frenki

    frenki

    Joined:
    Jan 6, 2015
    Posts:
    3
    Has anyone implement ledge grabbing and will please share the script?
     
  5. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,241
    Does anybody can make a vid tutorial how to change the player model? Thank you
     
  6. dragonstar

    dragonstar

    Joined:
    Sep 27, 2010
    Posts:
    204
    read the documentation the only thing you have to do is replace the animator Controller animations and the model read the documentation all you need is there i know because i have the same problem
     
  7. janeDoe9173

    janeDoe9173

    Joined:
    Jul 20, 2014
    Posts:
    7
    Hello everyone. First let me start by saying GREAT asset and I hope this thread is still read by other users. Secondly, I have read through this thread in hopes of finding this already answered and while I did find one with someone having the issue I couldn't find the solution. Heres the problem... Ive changed out my player, but when I am adding the armsCarry animation he no longer walks. its just the annimation frame of him carrying an object. Can someone tell me how to fix this so he still walks while carrying an object? Also could someone tell me how to make it where the player plays a pull animation when he's pulling opposed to playing the push animation when he's pushing.
     
  8. nuonical

    nuonical

    Joined:
    Feb 28, 2015
    Posts:
    46
    What's the status on grabbing objects in Unity 5? I just did a fresh install (v1.5) on a new project and the character will not grab a hold of anything. I see Greg's post above, but this appears to still be an issue.
     
  9. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    I just made a small update which lets you adjust the position of where you hold any held objects because a few people have asked me whether thats possible. Should be updated by unity soon.

    I am thinking about making a video tutorial which goes through how to change character as this is frequently asked, but i need a working model to use. Can anyone donate one to me? Please email me, and ill try to make the video.

    JaneDoe - you probably need to edit your "avatarMask" for those animations, so when it is playing the carry animation, it is only effecting the arms and not the feet as well. If you want to add a different animation for pull/push you'd need to add that new state into the animation controller, and also tell it when to play that via script. If you don't know what you're doing with mechanim/scripting in this way, id recommend just using 1 animation for both.

    Nuonical - Another person has said this to me. They then reported that reinstalling unity and re-importing the package solved this because unitys download was doing something weird, so i have no idea. I can assure you the package is all fixed and working with Unity 5. There seem to be many problems on unitys end right now concerning the unity 5 update which i have had to grapple with. To try and fix this, i've made it so the only version of the package available is the unity 5 one, and when unity updates the kit (within the week?) this should be in effect.

    BlurTime - when you have that many small errors, it generally means theres a minor syntax error. Id check those first lines of code it listed and look for any syntax errors like a missing bracket or something.

    KyleYoungBlom - so if you do a "ctr+f" for moveDirection inside the playerMove script, you'll see thats really a vector3 position that the player will move to and look at, and that it gets set by the input at the end of "update". you could add a line after that which sets it to a vector3 position if you like.. something like: if (goalPosition != Vector3.zero) moveDirection = goalPosition. so if you set that variable, it will override all input and the player will move to that position, and then set to vector3.zero when you want to re-enable controls. does that help? in future, send me a support email and i can get to it quicker. thanks
     
    Last edited: Oct 12, 2015
  10. nuonical

    nuonical

    Joined:
    Feb 28, 2015
    Posts:
    46
    @Greg Sergeant - Uninstalling Unity and re-importing fixed the issue for me as well - many thanks for pointing me in the right direction. Unity was showing some odd behavior before uninstalling, so glad to know there is a solution. Thanks for getting this up and running for Unity5.
     
  11. nicolasbulchak

    nicolasbulchak

    Joined:
    Aug 9, 2013
    Posts:
    37
    Hey Greg, of everything I have purchased on the asset store. Your package is clearly my favorite, and has the best active community. It is very exciting seeing people learning through this fantastic starter kit!
    If I can offer any 3D models (characters / environments / props) to help with your tutorials documentation or anything else you might need I am happy to offer. This kit has given me a great foundation for learning unity myself, and for the game project I am currently working on. Here are a few quick screenshots of what me and a few others have put together so far thanks to you. We are planning on releasing a first world demo end of this year. dyl_frame_01.jpg

    dyl_frame_02.jpg
    dyl_frame_04.jpg

    dyl_frame_05.jpg
     
    Bhanshee00 likes this.
  12. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    That looks amazing! The art style reminds me of Rayman while the character reminds me of Croc and it all comes together perfectly. Seriously, since my platformer using this kit is on indefinite hold, I'd love to offer any scripting help to you on this project. Just let me know if you need help with anything. :)
     
  13. nicolasbulchak

    nicolasbulchak

    Joined:
    Aug 9, 2013
    Posts:
    37
    wow! I will totally take you up on that! I've been in the background following the work you have been doing for a while. I was a big fan of games like blast corps (especially the music) and games like ocarina of time and mario 64 and I can totally see the influence of this gaming period in your work.- Our game is meant to be a bit of a kickback to the age of nintendo 64. We are very story focused, with dramatic cutscenes - back and forth dialogue - and a big epic storyline that unfolds as you are pushed through big worlds full of puzzles - platformer challenges and unique enemies. So this project will have no shortage of scripting challenges.
     
  14. Metatron2

    Metatron2

    Joined:
    Oct 23, 2015
    Posts:
    4
    Just bought this and while testing I found a strange error. The box pickup works fine in the 3d demo but not in the 2d demo. I tried moving the box to another position but didnt work. I checked the sphere gizmo (LookTarget I assume) and it seems to be clear. Pushing boxes works but no lifting in 2D. I checked your web demo of 2D and there it does work. Im running win7 64, Unity 5.2.1f1 and havent changed anything in the package. Any ideas?

    Help appreciated.
     
    Last edited: Oct 23, 2015
  15. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    It's been a looong time since I opened up my Besus project (~8 months to be exact) but the urge to do some platformer work really hit lately. That being said I was inspired by Mario (Mario Maker specifically - maybe that's where the urge came from?) to create a sort of invincibility star (or in my case, card) powerup for my character:

    http://gfycat.com/SharpBoringAnole

    The logic behind this is simple, upon collecting the card, activate a child object on the player which is nothing more than an object with a collider (trigger) on it and a script which has an OnTriggerEnter function. Upon an object (enemy or pickup) entering the trigger zone, I apply damage through the DealDamage script so the object takes damage through its health component as well as applying a push force. The flashing is just another script I threw together to randomly cycle (lerp) the material color to give it that Mario-esque invincibility feeling. Maybe adding some shiny particles would complete the look.

    If anyone wants either of these scrips, let me know and I'll gladly share them. :)
     
  16. frenki

    frenki

    Joined:
    Jan 6, 2015
    Posts:
    3
    Besus, It would be really nice if you share this script with me.
     
  17. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    I've generalized this script to remove some of my effects (and specific calls to my code) so it will be up to you to enable/disable the script as necessary.

    Create a new child game object on the player and add a collider (any kind will do) and make is slightly larger than the player. Add this script to it:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. [RequireComponent(typeof(DealDamage))]
    5. public class InvincibleTrigger : MonoBehaviour
    6. {
    7.     public int damageToInflict = 10;
    8.     public float hitPushForce = 35f;
    9.     public float hitPushHeight = 3f;
    10.  
    11.     private DealDamage damage;
    12.  
    13.     void Awake()
    14.     {
    15.         damage = GetComponent<DealDamage>();
    16.  
    17.         GetComponent<Collider>().isTrigger = true;
    18.  
    19.         gameObject.SetActive(false);
    20.     }
    21.  
    22.     void OnTriggerStay(Collider other)
    23.     {
    24.         if (other.tag == "Enemy" || other.tag == "Pickup")
    25.         {
    26.             if (!other.GetComponent<Health>().flashing)
    27.             {
    28.                 damage.Attack(other.gameObject, damageToInflict, hitPushHeight, hitPushForce);
    29.             }
    30.         }
    31.     }
    32. }
    By default the script disables the game object that it is attached to so again, you will need to add some code in to your PlayerMove (or whatever) script to enable the object when you want the invincibility to be active.
     
  18. frenki

    frenki

    Joined:
    Jan 6, 2015
    Posts:
    3
    Besus, thank you for the script. Works great.
     
    Last edited: Oct 27, 2015
  19. uncones

    uncones

    Joined:
    Sep 19, 2015
    Posts:
    14
    Hi there,

    I purchased this package to learn Unity and so far so good. I'm trying to make the character in the 2D environment walking on walls. How could I achieve this, could you point to the right direction on what changes I should try to make please?

    Thank you!
     
  20. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    So do you mean having the character (literally) walking up walls? Or more like a temporary wall run (like in Mirrors Edge)? I'm having a hard time picturing the end result that you are trying to achieve. :(
     
  21. uncones

    uncones

    Joined:
    Sep 19, 2015
    Posts:
    14
    Thank you for quick response.

    I mean, literally, walking up walls in the 2D side scroller. I am trying to simulate an insect, an ant, that can climb on walls.
     
  22. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    That won't be easy (especially if you're still learning Unity). What you will likely need to do is fire a short Raycast out from the character to check for walls in front of them, and if it hits a wall (you could use tags to check for walls that can be walked on) align the character's transform.up to the hit.normal of the wall. You would also need to turn off gravity so the player doesn't get pulled back down and change the controls so left/right still makes them move up and down (if you want control to remain the same that is).

    For some code examples, Google has no shortage of results for that mechanic.
     
  23. uncones

    uncones

    Joined:
    Sep 19, 2015
    Posts:
    14
    Hi,

    So, this kit uses empty objects "FloorCheckers" inside the isGrounded() to check whats at players feet, at each floor checkers position.

    For what you say, I'm wondering if I should add another empty object as a floor checker that goes in front of the player and shoot the raycast from this floor checker to see if what is in front is a climbing wall and then do the respective transformations. Am I going on the right direction here?

    I tried to do this, but in the foreach loop, when I try to check if the floor checker is tagged as the one in front of the player, nothing else works.
     
  24. uncones

    uncones

    Joined:
    Sep 19, 2015
    Posts:
    14
    Hi,

    @Besus your answers helped me to get the character identifying the wall and climbing without jumping, once it detects the wall will do, however, since I'm still learning I would appreciate if you can help me with the following questions:

    1. Once I get the character in the wall, I turned off Gravity but then if move the character it gets out of the wall, floating. How can I prevent this?
    2. How can I do to identify that the character is at the top of the surface, cube, so it doesn't go up floating , and when going down, how can I make it to stick to the wall instead of floating too?
    3. How do I rotate the character so that his feet are grounded to the surface?

    Thank you
     
    Last edited: Nov 1, 2015
  25. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    There's a number of ways to handle that but personally I would look in to creating a new gravity system entirely.

    You'll need to create artificial gravity to suck him back to the wall. Look in to planetary gravity (like Mario Galaxy) for some ways on how to handle that.

    See above answer. ;)

    After getting the artificial gravity set up, you'll just need to align the characters transform.up to the surface normal of the grounded checkers (or whichever raycast you are using to check the surface they are walking on). Creating the planetary gravity will likely involve doing this already.
     
  26. uncones

    uncones

    Joined:
    Sep 19, 2015
    Posts:
    14
    I'm trying to do something that looks like this for camera and platform

    From min 3:26
     
    dragonstar likes this.
  27. nuonical

    nuonical

    Joined:
    Feb 28, 2015
    Posts:
    46
    Has anyone had any luck getting rotating platforms to work? I'm trying to avoid parenting the player to the platform.

    I've tried rotating the platform via it's transform, and via it's rigidbody with no luck. Has anyone been able to get the player to rotate along with a platform?

    Here is a script you can apply to a platform object to make it rotate on it's Y axis :

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class Motor : MonoBehaviour {
    5.        
    6.     public float RotateSpeed = 10f;  
    7.     Rigidbody rb;
    8.    
    9.     void Start () {
    10.         rb = GetComponent<Rigidbody>();
    11.     }
    12.    
    13.     // Rotates on the Y axis at RotateSpeed
    14.     void FixedUpdate () {
    15.        
    16.         if(rb) {
    17.             Vector3 eulerAngleVelocity = new Vector3(0, RotateSpeed, 0);  
    18.            
    19.             Quaternion deltaRotation = Quaternion.Euler(eulerAngleVelocity * Time.fixedDeltaTime);
    20.             rb.MoveRotation(rb.rotation * deltaRotation);
    21.         }
    22.         else {  
    23.             transform.Rotate (Vector3.up, RotateSpeed * Time.deltaTime);
    24.         }
    25.     }
    26. }
    27.  
     
  28. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    I've only had luck with matching rotations using the parenting method: http://gfycat.com/MagnificentMealyGorilla

    I however have not had any luck sticking the player to moving platforms. :(
     
  29. Metatron2

    Metatron2

    Joined:
    Oct 23, 2015
    Posts:
    4
    Im trying to call the MoveTo function in the characterMotor script to find out the boolean value (ie have we arrived) using a variable type CharacterMotor named "charactermotor" and then calling charactermotor.MoveTo();
    I get the error "no overload for method "MoveTo" takes 0 arguments". I looked it up and someone said this is because of a conflict in naming but I dont see with what other name. Either way, I really need to access this variable to know when my move is finished so if someone knows the answer it 'd be a great help.
    TIA
     
  30. Kuszk

    Kuszk

    Joined:
    Apr 11, 2015
    Posts:
    5
    Hello, since i am using Free Lock on camera, when i try to look up i see my character "bottom" is there any way to hide the character model when looking like that? I tried OnCollision Enter but it doen't work,while the same script works when attached to ball and cube.

    I would be really glad.
     
  31. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    You still need to pass the arguments to the MoveTo function when setting a bool off of it. So in the PlayerMove script for example you would set something like:

    Code (CSharp):
    1. bool arrived = MoveTo(moveDirection, curAccel, 0.7f, true);
     
  32. Metatron2

    Metatron2

    Joined:
    Oct 23, 2015
    Posts:
    4
    Thanks for your help Besus. However I need to call this from quite a few scripts so filling in all the arguments everytime is cumbersome so I "solved" it by creating a public static bool in the CharacterMotor script and accessing that instead. But good to know how to call this function.
     
  33. Metatron2

    Metatron2

    Joined:
    Oct 23, 2015
    Posts:
    4
    I swapped in a humanoid character and I d like to use a ragdoll for collision/death sequences. I made a ragdoll and already used a function call to switch all the connected rigidbodies to kinematic but I still get very weird results. Im sure this has something to do with the rigidbodies still being present on the player so I guess I need to swap in the ragdoll the moment the player dies? Any suggestions on how to do this?
     
  34. nicolasbulchak

    nicolasbulchak

    Joined:
    Aug 9, 2013
    Posts:
    37
    Hey Besus, do you have any documentation on how you created the free joystick camera control?
     
  35. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    Just by applying the same logic to the Y axis of the camera as the CamHorizontal.
    Code (CSharp):
    1. float angle2 = (Input.GetAxis("CameraY") * sensitivityY * 20f) * Time.deltaTime;
    2. followTarget.RotateAround(target.position, transform.right, -angle2);
    I ended up restricting it so you can't keep going around in circles by clamping the angle2 float.

    Create 3 new variables:
    Code (CSharp):
    1.     private float startingAngle = 0f;
    2.     public float maxVert = 20f;
    3.     public float minVert = -25f;
    And then add the logic before the above code to actually rotate the camera.
    Code (CSharp):
    1.             startingAngle -= angle2;
    2.             if (startingAngle > maxVert)
    3.                 startingAngle = maxVert;
    4.             if (startingAngle < minVert)
    5.                 startingAngle = minVert;
    6.  
    7.             //Prevent moving the camera further if the min/max values are reached.
    8.             if (startingAngle <= minVert || startingAngle >= maxVert)
    9.                 angle2 = 0f;
    Of course you can name the axis whatever you want so long as it's configured in the Input settings.
     
  36. nicolasbulchak

    nicolasbulchak

    Joined:
    Aug 9, 2013
    Posts:
    37
    Awesome! Thanks!
     
  37. Spram

    Spram

    Joined:
    Apr 11, 2015
    Posts:
    4
    I've tried to change the way the character jumps but I fail!

    I just want to make it so the height of the jump is based on how long you hold the jump button. I've looked for online tutorials and I don't know how to apply what I see to the kit's player script. Any ideas?
     
  38. Ale_alejandro

    Ale_alejandro

    Joined:
    Dec 12, 2012
    Posts:
    18
    If besus or many of the other great devs who work on this kit can provide me with a power up script that would be great!

    Basically I want to have a basic base model character that's blue. Basic attributes.

    When she gets the green power up she can double jump

    Red power up she can melee punch

    Purple power up run faster

    I'm making a simple platformer for kids. I'll post my progress here soon. Happy to see the updates to the kit!
     
  39. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    I think you may be waiting on that for a while. I know that personally I'm not in the business of just doing things for people, however I will gladly assist if an honest effort is put forth.
     
  40. Augmented_Island_Studios

    Augmented_Island_Studios

    Joined:
    Feb 16, 2012
    Posts:
    58
    Hi, I'm really interested on acquiring this asset and I've been checking a few pages in the forum because I've been trying to make a character double jump and glide and haven't seen inside the forum about it (specially the glide).

    I understand that the double and triple jump implementation here is as in Mario that you have to jump again after you have landed, I tried to make my own version using rigidbody with and withou gravity (creating my own gravity adding a force but I'm not quite sure this is the best way to do it) mostly the double jump is not an issue but I haven't been succesful with the gliding part, Iv'e tried to add a force upwards while gliding to counter the gravity and such, but is very unpredictable.

    I just wanted to know if someone has implemented it using to asset to buy asap, and if the knowledge on how to do it can be shared :)

    Thanks.
     
  41. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    It certainly is possible. I've found it best (and most consistent) to set the current Y Velocity of the character to 0 and then manually set a new Y Velocity for them. Create a new float (let's say something like glideFactor) and bool to use while gliding and then you could do something like:

    Code (CSharp):
    1.         if (gliding)
    2.         {
    3.             Rigidbody rb = GetComponent<Rigidbody>();
    4.             rb.velocity = new Vector3(rb.velocity.x, 0f, rb.velocity.z);
    5.             rb.AddRelativeForce(Vector3.down * glideFactor, ForceMode.VelocityChange);
    6.         }
     
  42. Augmented_Island_Studios

    Augmented_Island_Studios

    Joined:
    Feb 16, 2012
    Posts:
    58
    Great Besus, thank you! that worked better and simpler from what I was trying :)

    Today I checked all the pages of the forum and found awesome developments and your work is great!!! I just couldn't but chain watch and read your development blog on Journey for Vitality, is coming up greeeeat (I already downloaded the demo but going to try it later). There was something that really intrigued me, it was your approach on foot step sounds according to materials (volume 5 vid). I was wondering how can you create an array that recives two parameters (texture and associated sound clip, making the homework: I think this is the approach(?) http://forum.unity3d.com/threads/c-arrays-with-multiple-types-of-data-at-each-point.144459/) I understood that you checked the texture raycasting to the floor and comparing, I was wondering if I could bother you with some code snippet showing the comparing method or you're just using if(texture2D == myTextureToCompare) after getting the rendering component and the material ?

    And on a side note, you should get an agreement with Icarus to sell your features because they really expand on the platformer controller, I think a lot of people would be interested.

    Thanks in advance
     
    joaobaltieri likes this.
  43. Ale_alejandro

    Ale_alejandro

    Joined:
    Dec 12, 2012
    Posts:
    18
    Well I'm an artist by trade so I would definitely provide graphic design or 3d modeling help to anyone who helps me with the script. My game has had multiple prototypes I just haven't posted it. I'll update this post with my platformer soon. Thanks!
     
  44. MichaelNielsenDev

    MichaelNielsenDev

    Joined:
    Apr 17, 2014
    Posts:
    9
    First off, fantastic kit! Really great content for the price.

    Second, I could use just a bit of help. I'm trying to set up use with a 360 controller and I'm hitting some issues with loose control sticks leading to lots of continuous movement of the camera and character without any input. I tried modifying the PlayerMove script with a simple dead zone, but it doesn't seem to be fixing how sensitive it's picking up input, and I'm not sure why.

    I've used this 360 controller for many games and never had any issue with characters/camera moving on their own. I also ran joy.cpl (I'm on windows) to test out the controller inputs, and besides some expected small variance, it functions very well and should by all means remain within the dead zone I've created. Any ideas?

    EDIT: Figured it out myself. For anyone who had the same issue as me, in Unity's Input manager, playing with the Gravity, Dead, and Sensitivity settings for an input fixed it. Which also leads me to say that the below dead zone script is useless since Unity actually comes with a dead zone setting (the aforementioned "dead" setting for an input) that works much better.

    Here's the addition I made to the PlayerMove script:


    1. //get movement input, accounting for dead zone, and set direction to move in
    2. Vector2 stickInput = new Vector2 (Input.GetAxis ("Horizontal"), Input.GetAxis ("Vertical"));
    3. if (stickInput.magnitude < deadZone)
    4. stickInput = Vector2.zero;
    5. else
    6. stickInput = stickInput.normalized * ((stickInput.magnitude - deadZone) / (1 - deadZone));
    7. float h = stickInput.x;
    8. float v = stickInput.y;
    9. print (stickInput);
     
    Last edited: Dec 13, 2015
  45. tyrot

    tyrot

    Joined:
    Aug 18, 2013
    Posts:
    18
    guys i am totally newbee .. so please bare with me.

    i must export my demo to android . which plugin should i purchase for controls.. ?

    for example ..control freak or easy touch ?

    i am 3d artist so i need something which works and easy to implement..

    thank you in advance..
     
  46. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Hello Greg, does your "Complete Physics Platformer Kit" work with the new Unity5.2? I know there were some code changes that no longer work from previous Unity versions.
    O' and some of the forum chat says there was wall jumping, but I don't see wall jumping listed in the game features.

    Sean
     
  47. rjdfhorn2006

    rjdfhorn2006

    Joined:
    Jun 14, 2010
    Posts:
    141
    I've been using this kit for a while and it's really great but does anyone know how to stop the character's rigidbody from sliding? Sliding isn't too noticeable when you're grounded, but when you're not it's much more noticeable. For example, I've given my character the ability to climb an overhead cage (think monkey bars), and the character slides when you let go of the keys. In other words, does anyone know how to modify these scripts to allow for constant speed?
     
  48. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    That is an unfortunate side effect of the physics engine. As gravity is aways pushing down and the character has a "frictionless" physics material, they are going to slide a bit on any slope, no matter how small. To remedy this you can either turn off gravity when they are not moving or jumping (being sure to turn it back on when they do move or jump) or swap out the physics material for one with more friction (also when they are not moving or jumping). If you use a stronger physics material all the time though, you will notice the character drags a lot more so you would definitely want to swap it back and forth.

    We had actually discussed the timing on turning gravity on and off to resolve this a few pages back I believe. The timings there could also be used for swapping the physics material back and forth as needed.
     
  49. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    I just purchased the platformer kit and I'm excited to play with it. I can't get the moving platform to work?

    1. I created a cube. Added the "Moving Platform " tag and added the "Player Move" script to the cube.
    2. added the MoveToPoints to it.
    3. Create empty game objects, named them wp1, wp1, wp3, parent them to the cube, tagged them "EditorOnly", then moved the wp's around the level where the platform might go.
    a. blue sphere gizmos did not show.
    b. pressed play to see if the platform would move, but it did not.

    Thank you for putting this kit out for people to play with.
     
  50. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    O' I'll just make prefabs out of the 3D demo scene moving platforms.
    "Nothing to see here, these aren't the droids your looking for. Move along...move along." :)