Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    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
    Click to Play the 2D demo!

    Here it is early (it will go up in the asset description when the update is approved)
    Creating a "true 2D" game (no 3D character rotation, flat graphics) is just as simple to make :)

    Definitely. Now the 2D update is complete, added camera control and functionality is top priority.

    Yes, the kit is built on rigidbodies (highly optimised physX) instead of the more cumbersome character controller (which is a kinematic rigidbody, but also does capsule cast and extra calculations every frame), so it is incredibly fast.



    Good suggestions! I'll look into both of them.
     
  2. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    Great!!!
     
  3. Hboybowen

    Hboybowen

    Joined:
    Oct 17, 2009
    Posts:
    27
    how did you create the animation system? I am hearing a few people say its difficult to replace the character with the same naming convention. Can you elaborate to clear the confusion.

    I dont want to buy this and I cannot setup characters...
     
  4. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    589
    If one were to buy this would it be possible for you to export a unity 3.5 version for those of us not using unity 4?

    If possible, you can count me in for a purchase.(though more than likely I will be buying regardless.lol)

    I just have a couple projects that haven't ported well to unity 4, and I'd like to use this system in one of them.
     
  5. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    How it works:
    The player has specific animations for its model/rig, those animations are in an 'animator controller' state machine.
    'Player Move' script and 'Throwing' script pass information to the 'animator controller' to blend between animation states.

    How to change player animations:
    1. Swap the current player model for your new one (it's a child of the player prefab)
    2. Assign 'Player Controller' (in the "misc" folder) as the 'animator controller' for your new model
    3. For each animation state in 'Player Controller', select the state and then choose your new animation from the drop down selection "motion"
    4. In 'PlayerMove' and 'Throwing' scripts, for the variable "animator" check the 'Player Controller' is assigned


    It's very simple, takes 2 minutes and if you have any difficulties just contact the support email and we'll be happy to help you out! If you want to learn more, read the mechanim documentation.

    Everything should work, except the mechanim player animations (because mechanim didn't exist for 3.5). I can double check this for you if you like.
     
  6. Venged

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    502
    This is a great kit! You should add the ability to mount and ride horses and cars and a grapple gun.
     
  7. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Cool stuff, so far the only issue for me is that is does not 'stay put' on a rotating platform - so if you have a ledge which rotates around another point, your character will just slide and fall off instead of rotating along with the surface they are standing on. I'm using standard Unity approach of doing rotations within FixedUpdate() as well.

    Any samples of how to do this so things behave as expected?
     
  8. poff

    poff

    Joined:
    Oct 12, 2013
    Posts:
    5
    Hey man, firstly epic job on the kit, secondly here are some requests:

    1. The camera clips trough the wall when you're close. [BUG]
    2. Footstep sounds.
    3. Allow us to stack boxes, the player throws them instead.
    4. Ranged enemies.
    5. Wall-run.
    6. Ledge-grab.
    7. Pole-swinging. So basically you just jump and grab an object, you can swing forward and back, and when you swing you can jump onto another object, or grab another pole.
    8. Thanks, you're awesome :)
     
    Last edited: Oct 29, 2013
  9. Sutton_2

    Sutton_2

    Joined:
    Jul 24, 2013
    Posts:
    17
    I hope touch controls are implemented soon! And nice work btw!
     
  10. boxesgames

    boxesgames

    Joined:
    Oct 29, 2013
    Posts:
    2
    me too,I will buy it when touch controls implemented !
     
  11. Smackizar

    Smackizar

    Joined:
    Oct 26, 2013
    Posts:
    6
    Hey, HeadTrip! I was looking to get gamepad inputs set up as well, but I'm unfortunately quite the noob. Any chance of you posting a quick walkthrough on what to add/replace to the inputs to get it working?

    Thanks!
     
  12. Smackizar

    Smackizar

    Joined:
    Oct 26, 2013
    Posts:
    6
    Whoops, figured it out myself!

    Only weirdness I got was that sometimes the movement and camera movement feel 'lazy' .. like.. If I rotate the camera 360 around my guy and let it go, it continues slowly moving. Same with the character sometimes... anything I'm doing wrong with that? (I'm gonna try making an empty project and re importing it and mapping it correctly form the get-go, I'm afraid maybe I messed up a setting somewhere in them? )

    Anyways, cheers! Loooove the kit so far, Greg!
     
  13. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Ok great! For anyone else whos wondring , the easist way is to look at the demo level.
    Open the input settings and change the mappings to joystick axis for x and y (i believe its joy45 for analog? Sorry im away from my pc)
    The buttons are even easier. IF you want to keep the keys, create a new entry in inputs and name it the same, leaving it set to the default settings that came with the demo level. I dont beleieve you can assign joystick axis and keys..?
    I beleieve the weirdness you describe is the sensitivty setting per each assigned joystick axis.
    I think mine was good at 0.016... Im away from it.
     
  14. Owlet

    Owlet

    Joined:
    Nov 2, 2013
    Posts:
    4
    Very nice thank you, Purchased

    I just replaced the character with mine, now I was just wondering how I could go about adding a Walk function, what I would ideally want is walk as default and run when you held down a key, is this easy enough to implement in this system?
     
  15. jushii

    jushii

    Joined:
    Jul 3, 2012
    Posts:
    2
    Great job dude!

    I have to second this bug. Otherwise its a pretty good kit.

    One another thing, if the ground is not flat, the character keeps sliding really slowly. Is there a way to fix this? (I don't mean steep slopes.)
     
  16. Dan_Tsukasa

    Dan_Tsukasa

    Joined:
    Jan 26, 2013
    Posts:
    156
    Hey this kit is looking great.

    I'd like to ask a few small things, does the mass of an object effect how easily the character can pull it or Push it?

    Suggestions.

    Rope
    Ledge climb
    Rope Swing
    Rope Climb
    Ability to switch to a different animation when walking up a steep slope

    2D Sprite support, ie: 2d Toolkit, at the moment my understanding is that the kit uses mechanim, which is great for people doing games with 3d models, but unfortunately not applicable to those using 2d sprites etc.
     
  17. poff

    poff

    Joined:
    Oct 12, 2013
    Posts:
    5
    I'd like to ask a few small things, does the mass of an object effect how easily the character can pull it or Push it?

    You just change the tag (or smth called like that) from Push to pull. Sorry don't know the exact one, didn't use unity now, basically just go to the object with rig-body and change the tag to pull or push.
     
  18. Minstrel

    Minstrel

    Joined:
    Mar 26, 2013
    Posts:
    6
    Just downloaded the update which has the 2.5d support (looks great!) but still no mouse look control?

    It's something I desperately need in my project so I might have to code it myself.

    @Dan - You can push (drag along the ground) or pickup (hold over head and throw, not place). Just tested and weight does make a difference to push and pickup.
     
  19. Owlet

    Owlet

    Joined:
    Nov 2, 2013
    Posts:
    4

    Don't worry I figured it out.

    This is a great little tool to play around with. Thanks
     
  20. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,160
    Would you share your wisdom? I need to know it too :) Thanks!
     
  21. Dan_Tsukasa

    Dan_Tsukasa

    Joined:
    Jan 26, 2013
    Posts:
    156
    Great, I was hoping it would.

    I'd love to buy this kit, but currently I'm using another kit because it supports all the things I require, if this kit adds the things from my suggestions then it'd be perfect.
     
  22. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    I would love a way to rotate the camera up and down, so in air you can look down at what you are about to land on. Unless this is already in?
     
  23. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,160
    Hi, awesome Template. Do you have any tutorials how to setup own objects with your scripts and make level change etc?
     
  24. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,160
    Dan which other kit do you use?
     
  25. Dan_Tsukasa

    Dan_Tsukasa

    Joined:
    Jan 26, 2013
    Posts:
    156
    I use 2D Platform controller currently, it works fine for most things and I really like it, but its raycast based and not physics based, so my game being a physics platformer isn't the best combination, since rigid bodies completely work against raycast based controllers, If I was smart enough I'd try to make a combination of the 2 honestly.

    I would link to it, but I already feel bad enough mentioning a competing script in this thread.
     
  26. Minstrel

    Minstrel

    Joined:
    Mar 26, 2013
    Posts:
    6
    Ok, so I started looking into mouse look for this plugin. It's probably not the most elegant solution and it is almost guaranteed to break on updating the plugin. I recommend that if you try this, back up your project first!

    Here is my solution so far;

    Enabling left / right mouse rotation
    1 - Go to Edit --> Project settings --> Input
    2 - Expand "CamHorizontal" and delete the Q and E from the positive / negative buttons
    3 - Change "Type" to "Mouse Movement"
    4 - Adjust the "Sensitivity" way down, like 0.1

    Look into "Screen.showCursor" and "Screen.lockCursor" to hide the mouse (coding).

    This hasn't been fully tested; and not at all with the 2d scenes so use your own discretion :). I'll update when I've figured out vertical movement.

    I think Mouselook will be added as an option in an update or two, but I need it sooner for my own project.
     
  27. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,160
    How can I change the player character? Can anybody please provide a tutorial? Thank you
     
  28. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Whats the correct way to implement "speed boosts" for this kit? At the moment, I'm setting "decel" to a low value and raising maxSpeed, but this causes a fair bit of slide. Looked through the code and saw "ManageMovement" on the controller, but i'd like to be able to adjust speed on the fly.
     
  29. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Ive tried swapping out for a biped animated character, I can't select the animations to assign...I also vote for a tutorial!
    thanks
     
  30. Pheidian

    Pheidian

    Joined:
    Nov 7, 2013
    Posts:
    8
    Hi,

    Just bought the kit, I'm basically new to Unity 3D as well, so while I'm learning how to use the kit I'm learning how to use basic Unity functions as well. I've got no coding or scripting background, I'm a 3D modeller / artist and planning to do a game with Unity. Sounds steep, right? Anyhow, reading this forum thread as well as playing around with Unity for few hours I managed to replace the player model with my animated character, even managed to get Enemy character model changed (though I don't seem to react with animations to what's happening). btw, Why is my enemy character model not reacting to movement speed change, but it seems to "drag himself" very slowly towards player when in sight radius - I would love him to move faster, but no matter how I change the speed settings it's always the same speed... (copied all enemy AI behavior functions from prefab to my enemy)

    I would love to have basic functions integrated on this package, that you could tweak easily:

    - falling / breaking platforms (with tweakable delay, when player jumps on it, when it starts to fall, falling speed etc)
    - Switch / platform activators (part A trigger that would make action for part B, for example floor trigger of a trap, that would make boulder to drop from the ceiling, or opening a door with a trigger from another place)

    I bet you can do this easy with Unity3D, but as I said I don't have much experience yet about the engine.
     
    Last edited: Nov 7, 2013
  31. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    To change level, assign the 'Goal' script to a trigger.
    Setting up your own objects is easy, scripts will not only auto-setup when dragged onto an object, but also let you know what they did in the console.
    You can also read through the guidebook for an in-depth understanding of each script; i'll be working on video tutorials in the near future as well.

    Adjust the: acceleration, deceleration and max speed of the player until you get values you like. Then have a script change those values when the power up is collected. You could also adjust the animation speed of the run animation, so the player appears to be sprinting.

    In 'Player Move' script add a line of code which changes the max speed when an input is pressed (and changes back when released).
    Send the current max speed to the animation controller.
    Add a walking animation which plays when we're moving but the 'max speed' is lower than the running speed.

    OK! I'll start working on a more informative tutorial and smoother artist workflow.

    Make sure your ground has the tag: 'untagged', send an email to support if the problem continues and we'll talk through it :)


    We're the #1 paid kit in our category, we have over 20 '5 STAR' reviews, critical acclaim from the Unity Staff and we've been picked up by schools for classroom teaching. Thankyou so much for the continued support! Keep the suggestions and feedback coming, and as always... happy platforming!
     
  32. poff

    poff

    Joined:
    Oct 12, 2013
    Posts:
    5
    Hi, what about the camera bug, where it clips trough the walls ? It gets really frustrating if you have a roof above your head.
     
  33. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Thanks for the responses.. I agree that camera collision bug is a tough one to ignore...

    Does your system support legacy animations/non mechanim ?
    I managed to tack on some animation using playmaker, was cool as a way to previz what it might look like.
    Also, with mecanim... Is it bones only? I'm imagining my biped based rig might not just drop in
    Thanks!
     
  34. Pheidian

    Pheidian

    Joined:
    Nov 7, 2013
    Posts:
    8
    Any way I can do enemies that just patrol around (back and forth in 2D platformer) and do not react to player movements at all? Do I Make enemy model with following two waypoints and animate the walk, but how it turns facing correctly then?
     
  35. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    It uses mechanim as the animation controller and takes any animations you like, so long as they are specific to your player model. I'm adding tutorials and improved artist workflow in this area very soon.

    Read the guidebook chapter on the 'Character Motor' script. It contains a simple method for giving the character a location to move toward, and managing speed/rotation automatically. You can write a simple script using this which makes a character patrol, but if you have no scripting knowledge at all; I'm going to be adding extra AI tools soon.

    Being fixed in the next update, as well as adding extra camera functionality.
     
  36. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Excellent! Thanks
     
  37. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,160
    Any ETA on the tutorials Sir? can't wait :)
     
  38. Sutton_2

    Sutton_2

    Joined:
    Jul 24, 2013
    Posts:
    17
    Any ETA on mobile controls? I and others will certainly love mobile support, thanks!
     
  39. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Get "Virtual Controls Suite" or other available mobile control script on the asset store and add it to this kit. It took me 10 mins to run it on android.
     
  40. Pheidian

    Pheidian

    Joined:
    Nov 7, 2013
    Posts:
    8
    Any chance of making another "goal" script - just to change a scene but without losing collected score restarting life meter. I would desperately need that kind of "transportation from level to another" without it to reset all attributes when loading a new scene (I'm doing sorts of open world sidescroller 3D platformer and need this just to move from area to another)

    Another tweak would be great to add for the "goal" script and the other goal script as well - a function that would fade the screen (if it's possible to add fade color and fade speed parameters as well?)

    As in: when triggered, delay and after that fade with delay and after the fade change the scene.
     
    Last edited: Nov 11, 2013
  41. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Looking foward to this as well!
     
  42. TheNorthridge

    TheNorthridge

    Joined:
    Jan 4, 2012
    Posts:
    193
    Hey Greg, Just bought your kit. Its great stuff :)

    Ive been having problems though. Ive followed your manual, how do I set up the Camera Rotation, and the -25 Gravity? It doesnt seem to work for me. They are my only two problems :)
     
  43. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    600
    I have just bought Complete Physics Platform Kit and Virtual Controls Suite, could you please tell me how you configured VCS to work with CPPK in 10 mins...

    Thanks in advance!
     
  44. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    1. Import both projects

    2. Open “nguiSuite” scene of “VirtualControls”, then select and copy “UI Root (2D)” game object

    3. Open one of the “Physics Platformer Kit” sample scene and paste it there

    4. Delete DPad object from it

    5. Duplicate AButton object and rename it to BButton(AButton will be Jump and BButton Throwing). Under BButton object find VCButtonNgui.cs script and change variable “Vc Name” from “A” to “B”. Move BButton object a little bit right

    6. Update the following 2 scripts

    - PlayerMove.cs – Update()

    Add the following line at the top of Update():
    VCAnalogJoystickBase joy = VCAnalogJoystickBase.GetInstance("stick");

    Update the following lines:
    //get movement input, set direction to move in
    float h = Input.GetAxisRaw ("Horizontal") + joy.AxisXRaw;
    float v = Input.GetAxisRaw ("Vertical") + joy.AxisYRaw;


    - PlayerMove.cs – JumpCalculations()

    Add the following line at the top
    VCButtonBase abtn = VCButtonBase.GetInstance("A");

    Update:
    //if we press jump in the air, save the time
    if ((Input.GetButtonDown ("Jump") || abtn.Pressed) !grounded)

    //and we press jump, or we pressed jump justt before hitting the ground
    if ((Input.GetButtonDown ("Jump") || abtn.Pressed) || airPressTime + jumpLeniancy > Time.time)


    - Throwing.cs – Update()

    Add at the top
    VCButtonBase abtn = VCButtonBase.GetInstance("B");

    Update:
    //when we press grab button, throw object if we're holding one
    if ((Input.GetButtonDown ("Grab") || abtn.PressBeganThisFrame) heldObj Time.time > timeOfPickup + 0.1f)

    if(Input.GetButtonUp ("Grab") || abtn.PressEndedThisFrame)


    - Throwing.cs - TriggerStay(Collider other)

    Add at the top:
    VCButtonBase abtn = VCButtonBase.GetInstance("B");

    Update:
    //if grab is pressed and an object is inside the players "grabBox" trigger
    if(Input.GetButton("Grab") || abtn.Pressed)


    7. Add VCTouchController.cs script to the scene and check "Multitouch" checkbox

     
    Last edited: Nov 14, 2013
  45. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    I am just loving this kit!! Is there a way that you know of to connect a camera to a path as you move? Like god of war , ICO, Knack...Would love to be able to control the camera as I move in the open space and/or the sidescroller...
    I wouldn't even mind using Itween(free) or purchasing curvy...

    Thanks!! :)
     
    Last edited: Nov 14, 2013
  46. SoloChristian

    SoloChristian

    Joined:
    Oct 9, 2012
    Posts:
    500
    Has anyone played with putting a 2D character in this kit? Like one from Smoothmoves etc...
     
  47. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    740
    This looks terrific. I'm curious about 'ski' or 'snowboardinging' like control for a main character. I have a game that I"'d love to pull out of mothballs, and this sounds like a winning kit to pull it off.

    It's a 2D Side-scrolling platformer, where we ski/board over hills and jump and smash items or land on enemies and such. Would this kit suit that sort of game? Very excited.
     
  48. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Does anyone have any links or resources for putting a camera on a rail, but with player control? (tied to player but on a spline).
    I found allot for cutscenes and where the player is on a spline, but not a camera on a spline...
     
  49. Minstrel

    Minstrel

    Joined:
    Mar 26, 2013
    Posts:
    6
    I know it's already raised, but has anyone figured out how to swap the player character out but retain the animations?

    I've located a few references to the character animator and swapped them, as well as a few other things but no joy as yet.


    Edit: After a few days of looking into Mecanim and rereading posts here several times I finally figured it out;

    From page one. I was missing setting up the character in the first place (See the start of a Mecanim Tutorial) and the 4th step, which is going to the Animator and swapping out the 'Motion' option on each animation. I grabbed some from the free Mecanim animations on the Asset Store.

    Hope this helps someone.
     
    Last edited: Nov 23, 2013
  50. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    loving the new 2D update, can I just add a little feature request, would it be possible to add some animation clip to the enemy object/script
    like idle run attack for example (I'v dropped a 3D character into the enemy prefab, so it move and causes damage, but would be nice to hook some animations up to this.

    great work keep it up (my fav asset at the mo)