Search Unity

  1. Unite Berlin 2018 schedule is now updated with talks on real-time ray-tracing, upcoming 2D features & many more. Check it out!
    Dismiss Notice
  2. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  3. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  4. 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
  5. 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. hensoup

    hensoup

    Joined:
    Jan 13, 2014
    Posts:
    27
    I should add ladders.
     
  2. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    301
    Hi,

    Ladder is basic of platform game, i think.

    +++
     
  3. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    Jeremy and Hensoup - THANKYOU SO MUCH for sharing your code and helping people out, and sharing your alternate solutions to game mechanics and having them be available for everyone in the community!

    Your game looks great! I'm a big fan of 2.5D platforming, i really like the environment and level design, it reminds me a bit of one of the first games i ever got which was Jurassic Park Lost World on the PS1. Here's a vid for inspiration: http://www.youtube.com/watch?v=P6RQg6tqjAk


    Thanks for the feedback, that's really helpful. I'll get to work on MAKING THAT EASIER!


    Looks fantastic! IT'S GREAT HOW WELL THE CHARACTER FITS IN with the other assets. Nice to see things integrate so well for people, it's gives the sense of a really coherent world :)

    Not yet, but in the meantime here are a few solutions out the box which could HELP YOUR PLAYER REACH NEW HEIGHTS!

    - pull/stack boxes to climb
    - a trampoline
    - an enemy which you can bounce on to get higher
    - an elevator
    - a cablecar which you need to grab onto to ride upwards (maybe you need to hold a key which can hook onto it)
    - a jet of wind or water using the waterzone
    - if your game is in space you can use the waterzone to achieve a zero gravity effect!!
    - a drawbridge using a hinge joint, you need to throw a box at to knock over, so you can walk up
    - a column which you need to break, once broken you can jump on the pieces
     
  4. unitychristy2

    unitychristy2

    Joined:
    Sep 8, 2013
    Posts:
    38
    Hi I have implemented a joystick control for IOS adapted from standard mobile assets.
    - I have kept the main character animation unchanged.
    -What I have noticed is that after about 10 minutes of game play (hard to emulate but does happen)the main character gets into a jumping loop where he never stops jumping.
    - I think this may be a bug in my multitouch solution rather than your standard kit and code.

    Could you comment or anyone else comment if they have had this problem with the unchanged project? I have spent about a week trying to resolve this and find the cause hence why I am posting here.
    Great project by the way. Many thanks.
     
  5. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    Sounds like a bug in your touch code - and i would run a lot of debugging tests. It seems likely that the game thinks your jump button is held down, so i would test for that first.
     
  6. andyolivella

    andyolivella

    Joined:
    Apr 7, 2012
    Posts:
    11
    dosent work with easytouch ,, you should make something for mobile most of developers in unity works for mobile
     
  7. andyolivella

    andyolivella

    Joined:
    Apr 7, 2012
    Posts:
    11
    well im having problems with easytouch , and i use easytouch for everything else and work from the beginning i dont know whats the problem could you please guide me on how to do it , i buy this package casue i need it for a mobile game , thanks ,,
     
  8. SoloChristian

    SoloChristian

    Joined:
    Oct 9, 2012
    Posts:
    402
    Try Control Freak plug-in got it working in 5 minutes.
     
  9. fredrick300

    fredrick300

    Joined:
    Jan 2, 2014
    Posts:
    80
    Has anyone figured out how to code/add footstep sounds?
    The players silent footsteps right now are jarringly awkward.
    Or shooting AI?
     
  10. PDubulous

    PDubulous

    Joined:
    Apr 16, 2013
    Posts:
    5
    Greg, you mentioned some of these mechanics for getting a player up higher in a level:

    - pull/stack boxes to climb
    - a trampoline
    - an enemy which you can bounce on to get higher
    - an elevator
    - a cablecar which you need to grab onto to ride upwards (maybe you need to hold a key which can hook onto it)
    - a jet of wind or water using the waterzone
    - if your game is in space you can use the waterzone to achieve a zero gravity effect!!
    - a drawbridge using a hinge joint, you need to throw a box at to knock over, so you can walk up
    - a column which you need to break, once broken you can jump on the pieces

    We have an elevator lifted by ropes and there is a Unity Hinge Joint at the connection and the entire thing is animated up and down in a loop. The physics works great and we can throw boxes at it and they land on it, but when the player lands on it, the avatar's animation and control freezes until something knocks it off the platform. After it drops off control returns. Other than that we are making great leaps forward in our project with this system. Its worked wonderfully so far.

    Any ideas on the elevator?
     
  11. darryldonohoe

    darryldonohoe

    Joined:
    Jan 10, 2012
    Posts:
    51
    I don't know if this was already answered. But is this kit compatible with planetary gravity? Like super mario galaxy?

    Thanks in advance and cheers,
    Darryl
     
  12. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    301
    Hi,

    Platform move is horizontal, currently. Have you trying platform move with vertical transformation?




    +++
     
  13. PDubulous

    PDubulous

    Joined:
    Apr 16, 2013
    Posts:
    5
    The platform moves ok. But we want it to have physics on it so it acts like a swing and can move back and forth as it rises.
     
  14. arrested_games

    arrested_games

    Joined:
    Mar 17, 2013
    Posts:
    294
    any ideas/help on this?
     
  15. PDubulous

    PDubulous

    Joined:
    Apr 16, 2013
    Posts:
    5

    It looks like you have everything applied to an empty game object that is off center or your transform on you original model in blender/max/etc is off center. I would suggest its the empty game object since the animations seem to play correctly. I bet you are controlling an empty game object and that's where your pivot is centered on. Your character meshes are probably offset and pivot around the empty parent object. If you move the children in alignment with the parent object it will clear right up.
     
  16. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    HEY GUYS! I've began working on some video tutorials, here are the first few which go through basic setup and also using the scripts to create a platformer from your own assets or from scratch:








    My first time doing videos like this so they have a few rough edges, but you just gotta get stuck in and learn to do these things! Hope they help you out. I'll get on making more covering things like swapping out character art, and also the ones I'm REALLY EXCITED about are going to cover how to use the assets in the kit in very clever ways, to create loads of unique gameplay possibilities you may not have thought about...


    I think i'll add these in a future free update.

    Glad to hear you're making fast progress with the kit! I don't quite know what the problem is, are you using the moving platform tools provided, or is it an animation? Does it have the moving platform tag? If you send a video or screenshot to the support email i can have a better idea of how to solve this for you.

    No, that is quite specific for certain games. If you wanted that write a simple script which:
    - gets the last object the player touched
    - gets a vector3 direction from the player > pointing toward the centre of that object
    - apply manual gravity using "AddForce" for the rigidbody
    - set the real unity gravity to 0 in settings

    Sorry i read past this. Like PDubulous has said, it's a problem with your pivot point not being centred to your characters centre. This is a common thing to watch out for when you're importing models from 3D packages! (especially blender which has a different axis system)
     
  17. PDubulous

    PDubulous

    Joined:
    Apr 16, 2013
    Posts:
    5
    Stoked about the tutorials Greg. We will take a look through this. We did make some progress on the lift. We had to set up a separate platform and make that the mover (This is off screen). Then we tied in our physics-based parts to that platform and the have a free swinging platform which completely reacts to physics with the character and the surrounding world.
     
  18. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    HI having a bit of trouble with the animation for the enemy. once it starts moving it seems to switch between the idle and running state (making it flicker) I noticed in the animator window the "moving" parameter is flicking on an off.

    it this just me or am I missing something ?
     
  19. thegwill

    thegwill

    Joined:
    Feb 3, 2014
    Posts:
    1
    I had this problem too and reported it to Greg (the author). He said it would be fixed.

    Until then, I've used the following workaround in scripts\TriggerParent.cs:

    Code (csharp):
    1. void OnTriggerExit (Collider other)
    2. {
    3.     colliding = false;
    4.     collided = false;
    5.     hitObject = null;
    6. }
    and commented out all of the LateUpdate() method.
     
  20. ClassicGameJunkie

    ClassicGameJunkie

    Joined:
    Dec 15, 2013
    Posts:
    112
    Last edited: Feb 20, 2014
  21. Clodo

    Clodo

    Joined:
    Dec 27, 2013
    Posts:
    40
    Some problem when picking object:


    during player movement, the picked object must stay attached to hand.

    How i can resolve? Thanks for any feedback.

    (edit: i mean that picked object must have the exacly rotation of the player, not 'tweened').
     

    Attached Files:

    Last edited: Feb 20, 2014
  22. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    143
    Maybe you should reduce the mass of the object?
     
  23. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,080
    Tested the demo, this is a great kit.

    However water system really needs to be revamped as your character can'tswim and only jump on water and it's inertia seems too fast.
    Here is the water areas that should be improved to have some better MArio 64 feel for example.
    it should be as a platformer to be able to
    1) swim only on water surface
    2) Be able to go down and swimm underwater instead of walk
    3) Adjustable swim speed and underwater swimming speeds.
    4) tweakable underwater physic values for AI and NPC (a fish will be fast underwater and a turtle slow with bigger inertia)


    And now here is what i plan to code lot more later , or better would be great if all that standard elements could be included in your pack :
    Character movements :
    - Double jump (always enabled or possible to activate mode deactivate in real time )
    - Jump Down smash : During jump if you press a fire button and down input direction : it makes some sort of fast falling kicking move (mario like)
    - Move Dash some : possible to make it continuous or playing at the end some dash recovery move to avoid player using it continuously
    - Move dash option in the air : you jump and can dash some short distance in the air
    - Glide on some descending slope if you are walking/running and you crouch
    - Push a button to make work some mechanism like press a button to make rotate some platform element
    - Invincibility power for some seconds
    Platform gameplay elements :
    - Non stable platforms : you walk on it, it begins to shank or color animate , and some second later it will break and disappear under your feets.
    - Rope system : Sort of simple direct line physic rope to grip to be able to go throught dangerous places
    - Trap spikes system : moving up and down automatically
    - Rotating sword trap : you must pass at the right time
    - Fire ball traps
    Character combat elements :
    - Firing fire balls like Mario flower power
    - Simple interchangeable weapon system (Ratchet and Clank style)
    - Picking and Throwing a bomb (could damage level tagged elements like breakable rocks)

    Another non essential ideas
    - drive a futurist air surf
    - drive a mini tank or whatever

    Great pack, really worth the value.
    I expect great incoming stuff also :)
     
    Last edited: Feb 21, 2014
  24. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,080
    Some point I forgot :
    - Flying ennemies around a zone, attacking when player is near
     
  25. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    726
    i think's the most importante think's is make new mecanim animation layer for special animation like dungeon breaker got
     
  26. Lakris

    Lakris

    Joined:
    Jan 10, 2014
    Posts:
    15
    I am new to Unity, and i am having problems with my Graphics.

    All platform games ive seen in development (and the tutorial video for the kit) the platforms, and grounds is made of cubes.
    How do i make the Graphics(object) more complex, ive imported my platforms and grounds from Blender with textures and normall maps,
    but my Player seems so not only run but slide sometimes, i think he is kind of stuck, because of the complexity of the mesh.

    How do others do this? i have tried to embed an invisible cube as boundry on every platform and ground, but it is much work, and i dont think it is the best way to do it.
    Any help, ideas, info or tutorials on ex. Youtube are welcomed

    thx
     
  27. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    143
    Hi,

    in your manual you wrote the following:

    But when you disable Y-Rotation, pick up a object an turn around you get really "nice" physics issues because the held object can't rotate. :D

    Cheers
     
  28. serkanos

    serkanos

    Joined:
    Jan 12, 2013
    Posts:
    25
    Great work. Where is double jump variabler? and guitexture for the lives(Hearts,coin) THanks
     
  29. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    143
    Hi again,

    I have a problem with my arm animations.
    I created a animation clip that only animates the hands for carrying, throwing etc.
    In the game all animations work fine (idle, walk, jump...) until I pick up a object. Then only my hands are right animated but the walk animation for e.g. doesn't apply anymore.
    When I throw the object away everything works fine again.

    Do I have to setup sth. in Blender?
    The animation clips for the hands are applied in the PlayerController on Layer 1 in the animator.

    Cheers
     
  30. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    301
    Hi,

    feature request: respawn function


    i have played with demo 2.5D scene and when i drop the ball on the red kill zone, the ball is not destroyed. If i come back, there is no ball available because this ball is in red kill zone


    Can u add respawn function ?


    +++
     
  31. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    Looks AMAZING! You know i'm excited for this game :)



    Try setting "weight change" to a small value on the "Throwing" script (attached to the player).

    Thanks again for the feedback! You can change the inertia to a higher value by setting the "drag" value of a water zone.

    Just use a mesh collider but keep things quite simple. Often in games the visuals of the mesh are complex but the actual collider on the object is much simpler. Box colliders are also more reliable. I like box colliders because the player can very easily see the layout of the level (remember Counter Strike gungame maps?) and know where to jump.. the new super mario games all have quite simple level geometry.


    Sounds like your layer-mask for the arm animations is not correct, so it's overriding the body animations as well. The guidebook covers this (section on replacing character art), but i'm making video tutorials for this soon as well!

    No double jump yet, and health is displayed as a number. Both of these will likely be in a future update.

    I have GOOD NEWS! Respawn is already in the kit!! Just select the red hazard and set it to effect 'pickup' objects as well, then add a health script to that ball, and check the respawn box. Now it will respawn when it falls down there... the beauty of this is you can make invisible areas that can destroy/respawn objects, so if the player needs an item to progress it's impossible for them to drop it off the map or something! :D
     
  32. m1735

    m1735

    Joined:
    Nov 28, 2013
    Posts:
    9
    Hello,

    Thanks for this great kit.

    I was wondering if you could implement damage to an NPC enemy via a particle system? I've been using "Control Freak" as a helper to make my character move - it has a built in gun system which uses particles/meshes... But since I don't seem to be able to add DealDamage.cs to a particle/mesh... Well... Is it possible?

    Also: ladders!

    Or ropes.

    :)
     
  33. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,080
    HI,


    This is stated triple jump : but each time you need to touch the ground between the 3 jumps.
    Could it be possible to have Double jump ? i mean you can jump another time beeing in the air afetr a first jump ? Very needed.

    Ok i succed in making some flying ennemy patrol in loop and chase player.
    But this example could be in the docs at it is not easy and trivial if you don't read the code.
    - Must create empty object with tag "waypoint"
    - Must attach component script : "MotToPoints"
    - In player panel in slot "moe to points Script" : select ennemy object
    And don't forget Loop type animation.

    Oh, great.
    If you could include a video that would cover some basic stuff like what i done above it could help a lot some people i think.
     
    Last edited: Mar 4, 2014
  34. serkanos

    serkanos

    Joined:
    Jan 12, 2013
    Posts:
    25
    DOuble jump and sprint. I hope next update :)
     
  35. Lakris

    Lakris

    Joined:
    Jan 10, 2014
    Posts:
    15
    I really hope someone can help me :)

    All in C# like the kit.
    Im trying to create a trigger to play an animation(a cube moving left), when my Player walks into an invisible trigger zone.
    - but i cant get it to Work :-(

    I've found a lot on the net, but nothing that really nailed it.

    I have made an animation, attached it to a cube. ticked play once, and even set it to legacy(someone wrote that would work)
    Created a trigger (invisible Cube) with box collider.

    Scripts that should do the job, but dont:

    using UnityEngine;
    using System.Collections;

    public class Example : MonoBehaviour {
    void OnTriggerEnter(Collider other) {
    Destroy(other.gameObject);
    }
    }

    Or:

    using UnityEngine;
    using System.Collections;

    public class Example : MonoBehaviour {
    void Example() {
    animation.Play();
    }
    }

    What am i doing wrong?

    Thx

    EDIT: Btw im also having a problem with my enemy sightArea, my Player is able to jump on it and kill the Enemy?!
     
    Last edited: Mar 9, 2014
  36. serkanos

    serkanos

    Joined:
    Jan 12, 2013
    Posts:
    25
    did you add throw script.?
     
  37. DNArt

    DNArt

    Joined:
    Jan 16, 2014
    Posts:
    16
    Hi all great Asset!!!

    I will be using it for mulitplayer mode with Photon and i wondered if any one here ( did try the same ) could advice me what script to disable from the default player and when to enable them.
    Any tips/help would be appreciated.

    Bill
     
  38. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    Take a look here: https://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnParticleCollision.html

    You could attach dealdamage script to the enemy itself, and then on particle collide have it damage itself. Look in the guidebook for the deal damage function, it is 1 line. Very simple :)

    Is it a trigger? Make sure "raycast hit triggers" is turned off in your project settings, or change the tag on it so it isn't enemy.

    Your first problem should really be asked on unity answers because its not specific to the kit but for triggering an animation you'd:
    - add animator to cube
    - uncheck "play on start"
    - in script do: OnTriggerEnter (Collider col)
    if (col.tag == "Player")
    - then reference the animator component and set play to true

    Disable: movement, throwing on the player.
    When a player joins the room (OnJoinRoom) instantiate a player on all clients, buffered, (with those scripts disabled), and if the player is owned by the local client (Photonview.ismine) enable the movement/throwing scripts, and set the camera target to us. For every other player instance they have health and can deal damage so if they get hurt, or land on an enemy you'll want to send an RPC to all clients updating that. If you interact with a rigidbody you'll want to sync the changes to position you make to that rigidbody for all the other clients.

    Networking is a tricky beast at first but when you get your head wrapped around the idea that everyone has their own version of the game running, you'll have no problem :)
     
  39. DNArt

    DNArt

    Joined:
    Jan 16, 2014
    Posts:
    16
    Hello Greg

    Thanks for the tips.
    Will follow your clues and see how things go :)
    Have a nice day
    Bill
     
  40. m1735

    m1735

    Joined:
    Nov 28, 2013
    Posts:
    9
    I can make the particle system bounce off the enemy - and even knock it back a bit - but the health stays the same.

    If it is simple, please be as kinda as to include such a feature in the next update - then even muppets like me can't get it wrong :)
     
  41. TechMedia

    TechMedia

    Joined:
    Jul 26, 2013
    Posts:
    15
    This is a very important asset for a lot of people who wants to develop games. The updates are coming in a VERY SLOW PACE. Just my 2 cents. Its a very nice kit, by the way,
     
  42. Baskyn

    Baskyn

    Joined:
    Feb 17, 2013
    Posts:
    67
    Any updates on what's coming next and when? I have this, but I've been putting off using it until ladder functionality is in the kit.
     
  43. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    iOS controls - when i can get on a mac to test it.

    Would anyone be willing to volunteer a bit of their time to test the iOS controls i've programmed? You need:
    - to have a mac
    - quick access to testing on iPhone
    - some basic knowledge of C#

    Send me a PM and we can skype, and hopefully get these released. Thanks!
     
  44. MaartenUT

    MaartenUT

    Joined:
    Aug 21, 2013
    Posts:
    18
    Can't you test it on android too? I've got working controls for this kit on android, and I think they're the same for iOS.
     
  45. ClassicGameJunkie

    ClassicGameJunkie

    Joined:
    Dec 15, 2013
    Posts:
    112
    Has anyone had any luck modifying the scripts to allow variable speed analog movement with a controller joystick? As in the character moves slower with a small tilt of the stick and faster with full force?
     
  46. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    Inside PlayerMove search for "GetAxisRaw" and change it to "GetAxis", see how that works for you.
     
  47. ClassicGameJunkie

    ClassicGameJunkie

    Joined:
    Dec 15, 2013
    Posts:
    112
    Hmnn that doesn't seem to make a difference. I figured I'd possibly need a second movement "state" that was slower and blend between them unless there was an automated way to do it in Unity by default, but so far haven't found much documentation with regards to either?
     
  48. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    301

    AMAZING !

    is working perfect.

    after re-spawning, do u know why ball rolls ?

    +++
     
    Last edited: Mar 28, 2014
  49. MaartenUT

    MaartenUT

    Joined:
    Aug 21, 2013
    Posts:
    18
    That's probably because the script doesn't reset the torque. Try editing the script and add a line to reset the torque in the Death() method.
     
  50. Greg Sergeant

    Greg Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    Is there a way to test android controls on the pc? I don't own an android device. If i could test this on a PC somehow these iOS controls would be out within a few days.

    If your controls are not from another asset store kit, but your own work is there any chance you could send me the asset pack so i can compare yours to mine and make sure they work - or possibly i could send mine to you for testing on android?