Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] 2D Platform Controller

Discussion in 'Assets and Asset Store' started by JohnnyA, Mar 11, 2013.

  1. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Push and Pull is not released (http://jnamobile.com/node/14 note status in progress :) ).

    The animations and states are there but there is no supporting code.

    EDIT: Unless you are referring to the preview sample of push and pull... in which case I can't offer support on it because its not finished :)

    EDIT: If the pullable box script is there in the release version ... it shouldn't be, sorry for any confusion.
     
    Last edited: Jul 30, 2013
  2. BlueByLiquid

    BlueByLiquid

    Joined:
    Jul 30, 2013
    Posts:
    13
    Just bought it. Is there a controllable example? Also your site says the product will be $25 and then links to the asset store and the price is $40. I'm not saying it isn't worth that just seemed like a bait and switch (Though I am guessing you have changed the price and not updated this).
     
  3. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    The original version was $25 but there have been many updates since then and the price has increased with the updates. Where does it say $25? This post seems to be okay, and the asset store is certainly up-to-date. I'll update it if I can find it (or if you tell me :) ).

    As for your second question ... what do you mean by controllable example? All the examples should be controllable (many have instructions on screen, but for the ones that don't use the arrow keys and space bar to jump, R to restart and in some cases SHIFT for run. The touch example requires Unity remote or to be deployed to a touch device).

    EDIT: Found one example on my website, updated. Just note that the web site is supposed to be "blog" style and hence the information from any one post is accurate at the time of posting and wont typically be updated after being posted.
     
    Last edited: Jul 30, 2013
  4. Dan_Tsukasa

    Dan_Tsukasa

    Joined:
    Jan 26, 2013
    Posts:
    155
    Ah sorry, I should have mentioned it was a preview sample from 21/07/2013. if this has been undated since but is still not ready to be submitted to the asset store would it be possible to request the newer updated version?

    The pullable box script isn't there in the release version, my fault for not specifying.
     
  5. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hrm in that case, I haven't updated it, the push and pull video from youtube is the same as the one you have so I'm not sure what the problem is.

    The ladder update is almost done, waiting on one animation and I have a few minor tweaks to add, so push and pull wont be too far away.

    - John A
     
  6. TattooRose

    TattooRose

    Joined:
    Jul 3, 2013
    Posts:
    2
    Thanks for the help Johnny. I will work on the approach you outlined. Definitely looking forward to all the new features you are working on.
     
  7. tonyel4

    tonyel4

    Joined:
    Jul 4, 2013
    Posts:
    10
    Hi!

    I been using your controller and I have to say it works great! But I'm having some issues right now with platforms that move up and down. Im using the HeroSample and when I changed the moving platform script for the up and down platform script the character doesn't get parented to the platform and it makes the character to play the falling animation each time the platform has to go down.

    Do you have any idea what could be wrong?
     
  8. BlueByLiquid

    BlueByLiquid

    Joined:
    Jul 30, 2013
    Posts:
    13
    I apparently can't type. What I meant to say is do you have a demo which uses the a controller not the keyboard as using the analog sticks. Guess I thought that would be included as most platformer games support controllers. I don't mean how to literally use a controller in Unity but an example of analog style relativistic movement based on the analog position. I really only got it for this purpose so I was disappointed not to see it.

    As for the price it is right on the very first page on your site: http://jnamobile.com/
    The top right image shows it is $25.00. The you click on it and it says again $25 on the next page. I just mention it because many people would not look again on the asset store since you have a picture of the store. It really doesn't look like a blog style site I guess because you have multiple products in each four boxes. I thought you were showing of different products. I just mention it for informational purchases. It still seems odd as you come to the site and your first thing you see is that its $25. Its up to you its your site. :)
     
  9. Piddau

    Piddau

    Joined:
    Jul 30, 2013
    Posts:
    1
    Hello JohnnyA,

    Bought this excellent asset along with 2d toolkit the other day, started up by making my own tilemap and added the default 2.5d hero you have created. All is well until I start trying hang on ledges. When you do this the hero flies away either to the left or to the right depending on what direction you try to hang. And the hero then proceeds to hang(to the left he hangs in the air, to the right he actually is on a tile)

    Also on the very same tilemap if I decide to drop down after hanging on a ledge I fall through one collider of tilemap.

    Do you know why this is, has this issue been found and fixed before? Or maybe Im doing something that is completely unintended?

    I did look at your example with the alien, however you do not use a tilemap there but loose parts as far as I was able to see at least.

    I have tried to increase the colliders by scaling the z value to see if that helped, but if anything I found it got slightly worse, might just have been my imagination. It happens on polygon colliders as well as normal square ones that, I make the colliders for the tiles in the tile editor for 2d toolkit.

    Please try this example of the issue I'm facing at http://www.gammalhammar.se/

    As you can see if you jump up a little bit there is a normal 3d cube that works exactly as it should.

    If you want and need and have time to look at it, I can send over the example so you can look closer at it.

    Thank you for a great Asset!
     
  10. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    I don't have a controller sample as yet, however the input class has a property x which controls X movement, its a float value, and the larger it gets the faster you go. So implementing a controller is trivial in that sense (several of my games use pads). The issue for a sample is that I need it to work on PC and Mac and i need it to work with multiple controllers. Unfortunately there is a bit of work in this, enough at least that there are multiple asset store packages for just this feature. That said I should add it to the feature list as its been requested several times and I have had a few people volunteer to test on PC for me (I only have Mac).

    As for the price on the site on the site, I must admit I didn't know anyone ever went there :) Ive updated it with a warning that the price will change and to check the asset store for the current price.
     
  11. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    @piddau

    The ledge hang uses the boundaries of a BOX collider to determine where to hang from. Trying to determine an arbitrary hanging point from a mesh would be very complex (requiring hand colliders, a bunch of checks to make sure some point really is a a ledge, etc) furthermore with 2D games you typically want very accurate positioning, compared to say 3D third person games where the camera angle allows quite a bit of leeway with positioning.

    As to your practical problem, most tile mapping solutions allow you to generate colliders in mutliple ways, I don't have it in front of me but 2D Toolkit likely has an option to generate a collider per tile instead of a large collision mesh.
     
  12. BlueByLiquid

    BlueByLiquid

    Joined:
    Jul 30, 2013
    Posts:
    13
    not to start a flame war but generally most games provide support for the 360 controller so just supporting that initially would likely be a big step. I will try to plug in one of the current frameworks for that and see how it goes.
     
  13. JOHNMCLAY

    JOHNMCLAY

    Joined:
    May 23, 2012
    Posts:
    38
    Hey Johnny! Fellow Aussie I see, congrats for that and your brilliant asset! :D

    I have a brief technical question. Your animation/positioning of the character when it climbs onto a platform is pretty much perfect and I was wondering how you achieved this?! I'm just getting my feet wet with game animation and so far it's been my understanding that animation character movement are usually handled separately (unless you're using mecanim's features).

    Some clarification would be greatly appreciated! :)
     
  14. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hi mate,

    whilst climbing your character (controller) is not moving, once the climb is complete, the character instantly moves to the finished location.

    To avoid a situation where bullets pass through your character while its ledge climbing I suggest attaching the HitBox to the model not the controller. In 3D this is trivial it can be a bit more work in 2D, but many of the sprite packages now allow you to animate colliders along with your model too.

    The timing and positioning of the animation need to be manually set (you can peek the animation data to get an approximation, then adjust until it looks right). Its not a perfect process, but it only needs to be done once per animation change so its not too bad.

    For the animation itself the character moves about the hands. In order to lock the hands in to the right position the controller finds the edge of the colliders. It then transitions to this "ideal" point from the current point based on a few settings (how much lee way you want to give, how long the snap should take). As you note this comes out pretty seamless.

    As you say with mecanim its a different process, and I will include an IK based mecanim climb for pro users (eventually).

    - John A
     
  15. JOHNMCLAY

    JOHNMCLAY

    Joined:
    May 23, 2012
    Posts:
    38
    Thank-you so much for your reply!

    That was a great explanation and has clarified pretty much all I was looking to glean!

    All the best to you in the future Johnny! :D
     
  16. Fabian Schempp

    Fabian Schempp

    Joined:
    Jun 1, 2013
    Posts:
    17
    Hi Johnny, thanks for your quick answers.
    Here is another question.
    The Platform Class has the DoAction() Method which is called if a character is hitting the Platform.
    Is there some kind of OnExit() Method which is called when the Character is leaving the Platform.
     
  17. tonyel4

    tonyel4

    Joined:
    Jul 4, 2013
    Posts:
    10
    Hi again

    I'm still having trouble making the platforms parent my character when they have to move vertically. Some times they do it and sometimes they dont :S
    I don't know what could be going wrong since both platform scripts that are use on the HeroSample are pretty much the same.
     
  18. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    There isn't, that's not a bad idea and would be trivial to add. Note that I will only add it to platforms that the character is parented to, a message would be sent when the character is unparented. Consider it part of the next update (which I am hopping to submit this weekend).
     
  19. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Ahh without the scripts/samples its a bit hard to comment on that.
     
  20. Fabian Schempp

    Fabian Schempp

    Joined:
    Jun 1, 2013
    Posts:
    17
    Thank you!
     
  21. AMO_Noot

    AMO_Noot

    Joined:
    Aug 14, 2012
    Posts:
    433
    Tonyel4, I was recently having the same issue myself. Try making a separate script and adding this:

    Then attach it to the platform you're animating. It worked pretty well for me. Not much of a coder myself, I happened to find this snippet earlier in this wonderful thread.


    Oh ho! I thought it would be. :D
    Can't wait to see it in the package.
     
    Last edited: Aug 1, 2013
  22. Talantyyr

    Talantyyr

    Joined:
    Nov 8, 2012
    Posts:
    10
    Hi John,

    You said swimming could be in one of the next updates.

    Will swimming include underwater swimming, like the underwater levels in mario? Or just swimming on top with the possibility to jump out? if the player get's pulled down that could be also nice for quicksand and stuff :)
     
  23. tonyel4

    tonyel4

    Joined:
    Jul 4, 2013
    Posts:
    10
    Sorry for not providing my script before. Here is the script I'm using to create a platform that moves up, down, back and forth. Currently my character only becomes the child of the platform when its going down but not up.

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class PenduloPlataforma : Platform
    5. {
    6.  
    7.     public float maxHeight;
    8.     public float minHeight;
    9.     public float maxWidth;
    10.     public float minWidth;
    11.    
    12.     public float speedY;
    13.     public float speedX;
    14.    
    15.     private float maxW;
    16.     private float minW;
    17.     private float maxH;
    18.     private float minH;
    19.    
    20.     override protected void DoStart()
    21.     {
    22.        
    23.         if (speedY < 0.0f  speedX < 0.0f) {
    24.             velocity = new Vector3(speedX, speedY, 0.0f);
    25.             speedY *= -1;
    26.             speedX *= -1;
    27.         }
    28.         else if(speedY < 0.0f  speedX >0.0f)
    29.         {
    30.             velocity = new Vector3(speedX, speedY, 0.0f);
    31.             speedY *= -1;
    32.            
    33.         }
    34.         else if(speedX > 0.0f  speedX < 0.0f)
    35.         {
    36.             velocity = new Vector3(speedX, speedY, 0.0f);
    37.             speedX *= -1;
    38.         }
    39.         else
    40.         {  
    41.             velocity = new Vector3(speedX, speedY, 0.0f);
    42.         }
    43.        
    44.        
    45.        
    46.         maxW = myTransform.position.x + maxWidth;
    47.         maxH = myTransform.position.y + maxHeight;
    48.         minW = myTransform.position.x - minWidth;
    49.         minH = myTransform.position.y - minHeight;
    50.    
    51.     }
    52.    
    53.     override protected void DoUpdate ()
    54.     {
    55.                 //Change pos in Y
    56.         if (myTransform.position.y >= maxH)
    57.         {
    58.  
    59.                 myTransform.position = new Vector3(myTransform.position.x, maxH, myTransform.position.z);
    60.                 velocity = new Vector3(velocity.x, -1 * speedY, 0.0f);
    61.         }
    62.         else if (myTransform.position.y <= minH )
    63.         {
    64.            
    65.             myTransform.position = new Vector3(myTransform.position.x, minH, myTransform.position.z);
    66.             velocity = new Vector3(velocity.x,speedY, 0.0f);
    67.  
    68.  
    69.         }
    70.        
    71.                 //Change pos in X
    72.         if(myTransform.position.x >= maxW)
    73.         {
    74.             myTransform.position = new Vector3(maxW, myTransform.position.y, myTransform.position.z);
    75.             velocity = new Vector3(-1 * speedX, velocity.y, 0.0f);
    76.         }
    77.         else if(myTransform.position.x <= minW)
    78.         {
    79.             myTransform.position = new Vector3(minW, myTransform.position.y, myTransform.position.z);
    80.             velocity = new Vector3(speedX, velocity.y, 0.0f);
    81.         }
    82.    
    83.     }
    84.    
    85.     override public Transform ParentOnStand(RaycastCharacterController character) {
    86.         return myTransform;
    87.     }
    88.    
    89. }
    Yeah I have that line of code right at the end of my script but its only working half of the time. Im not really sure what could be wrong here :confused:. Thanks for any help you can give me!
     
  24. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Nothing jumps out at me as obviously wrong, but I'm at a client site so I can't test in Unity at the moment. I'll get back to you when I can (about 12-14 hours from now).
     
  25. Bast-I

    Bast-I

    Joined:
    May 28, 2013
    Posts:
    18
    Hi all,

    I have another question -- hopefully, one day I can return the favor but for now, I am still learning to get used to Unity, C# and this asset.

    So, basically, I am wondering how to deal with platforms in a 2.5D-platformer. For example, how do you handle passthrough platforms? If the character jumps through the platform, then there will be some clipping that makes the passthrough look unnatural.
    In order to circumvent such problems, one could refrain from using passthrough platforms but this would limit the platforming experience and the level design, so this would be a last resort.
    I thought of another work-around: modifying the z-axis position of the character. So, the character would be in front of a platform while he is not as high as the platform. If he jumps high enough -- so his feet collider are at least as high as the platform --, he is moved back on the z-axis and consequently lands on the platform. When you want to pass through the platform, the character is moved to the front and falls down in front of he platform.

    I am pretty sure that this solution has its drawbacks, but for now, I'd like to play around with it in order to get a clearer understanding of the pros and cons. (But if any of you has some comments on this, please share them with me!)
    So how to implement something like that? I came up with triggers -- I am using the HeroSample with the rigidbody -- and an attached script that sets a variable named setFront to true on entering the trigger. See below.

    This works not the way I expected: while the movement to the back/front is done, the regular 2D movement of the character pauses. What I had in mind was that the z-axis movement and the regular x/y-axis movement would be adding up / carried out simultaneously and thus making the z-axis movement not too obvious.

    It would be fantastic if you could help me. Comments on the code are as welcome as comments on the concept.

    Bast I


    Code (csharp):
    1.  
    2. void Update() {
    3.         if (setFront == true) {
    4.             player.transform.root.position = Vector3.Lerp(startPoint, endPoint, (Time.time - startTime) / duration);
    5.             if (player.transform.root.position == endPoint) {
    6.                 setFront = false;
    7.             }
    8.         }
    9.     }  
    10.  
     
  26. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Howdy Bast I,

    ask as much as you want, I must admit I'm getting a bit snowed under trying to finish some commercial work and the ladder update, as well as preparing my entry for the windows competition (which uses the controller btw) so I'm not sure my responses will be as fast as desired but I will still endeavour to provide them/

    As to passthrough platforms in 2.5D, if your camera is aligned with the plane you can just use a shader that always renders the character in front of other objects (or at least other objects within a given layer). If you aren't much good at shaders a simple solution would be to simply use two camera; of course you could always just adjust z position of the character too, but that wont work very well with a perspective camera.

    Once your camera is off plane it becomes much tricker. You need to physically move the character to the right spots or its going to look weird. There's not really a simple answer here, but the basic idea wold be to trigger code or animations as you "pass through" the platform. For example you could turn your character around to face the ledge and do a ledge hang animation where he reaches out to the pass through platform which is further away, and then as he pulls himself towards it the character transforms in Z so he's now (visually) further back. When you leave the platform add a small z transform to your character so it drifts back to the normal z position. You would still need to have some level design constraints in place.

    That sounds like it would be fun to set up and I'm fighting the urge to go do it right now ... BUT ... I really need to focus on the things I'm currently working on. Maybe in a few weeks time.

    - John A
     
  27. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    By the way, I haven't seen any WIP posts from anyone recently. As always I would love to see what you are doing with the controller so please post if you have something you want to show!
     
  28. odolphie

    odolphie

    Joined:
    May 22, 2013
    Posts:
    10
    First the platitudes - really love this controller, the touch controls are excellent (allow sliding from one button to the next which gives a great experience for the player).

    Now the help/feature request please :) - trampoline / springboard sonic style would be awesome! I've trawled this forum but can't seem to find anyone else thats done it.

    I was using a physics based controller before so you could just add.force and propel them, anyone have any solutions for 2DPC ?
     
  29. lightassassin

    lightassassin

    Joined:
    Mar 29, 2013
    Posts:
    45
    Soon... really really soon I can show off. My artist is off doing other things, so I am currently solo now and rebooted the art style (to something I can handle alone).

    Also aiming for the Windows competition so much work, so little time. Especially since my game supports 4 player local play, and upto 4 player multiplayer co-op.

    Keep up the good work, and put your projects first John. =)
     
  30. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hmm I'm sure there was a springboard here somewhere, a constant bounce one is really simple:

    Code (csharp):
    1.  
    2. public class SpringboardPlatform : Platform {
    3.     public float springForce = 12.0f;
    4.  
    5.     override public void DoAction(RaycastCollider collider, RaycastCharacterController character) {
    6.         if (collider.direction == RC_Direction.DOWN) character.Velocity = new Vector3(character.Velocity.x, springForce);
    7.     }
    8. }
    9.  
    A relative bounce one is a bit more difficult because as the character hits the ground they start to slow down, so you wont get the right speed in your DoAction method. To achieve it you need to track the fall speed like the fall damage example. I'll take a look at adding that soon.
     
  31. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Awesome stuff (showing the project, not the extra work), although I'm not sure this is the right place to suggest putting my own projects first... you might get lynched :)
     
  32. Bast-I

    Bast-I

    Joined:
    May 28, 2013
    Posts:
    18
    Hi John A,

    thank you for your very helpful suggestions. Indeed, I think that many instances of the problem are best tackled with a custom shader. So thank you very much for directing me to this solution. A simple experimental set-up along these lines worked perfectly.
    At some point I have to cope with the cases where this set-up won't work -- that is, cases where the camera is lower than the character and part of the platform should mask the character. (This is what you were refering to with 'off plane camera', right?) But that can wait.
    Anyway, thanks for your quick response. As for the presentation of the WIP stuff -- as you might expect I am far from something that can be presented. But I would love to give something back at some point. I wish you godspeed with your projects!

    Bast I
     
  33. ChazBass

    ChazBass

    Joined:
    Jul 14, 2013
    Posts:
    153
    I recently purchased your 2DPlatformController and have been very impressed so far!

    One question I have: Currently ladder climbing (as seen in the BasicSample scene, for eample) is implemented in such a way that you can easily fall off a ladder unless you position the player directly under the ladder and come to a complete stop before climbing (i.e. no lateral movement). If you don't do this, then you will fall off before reaching the top or bottom.

    Climbing a ladder normally involved attaching to it (i.e. holding on to it while you climb). While you should be able to jump off or fall off a ladder, that should require an explicit action on the player's part to break the attachment. Currently there is no attach to/detach from behavior in you main controller script. Instead ladders seem to be treated as if they are vertical stairs. You do have the attach/detach behavior for ropes, though.

    How would you recommend adding this behavior for ladders?

    Thank you!
     
  34. Kersei

    Kersei

    Joined:
    Apr 29, 2013
    Posts:
    12
    Hi john,

    thanks for your answers and sorry for not answering earlier, look i compared the default configuration with my configuration and a couple questions came to me, when the character is swinging on the rope it has to be a child of the rope all the time? because my character don't do that and the example does it, my character has a box collider which triggers some stuff but like you tell me in several previous posts i put that collider in a different physical layer, i hope you can help me with this, if you think its necesary to see the project i can send it to you via pm. thanks in advance for your answers
     
  35. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hi Chaz,

    the current feature being implemented is better ladders which includes a number of improvements including locking movement in X, snapping, more animation states, etc. My plan is to finish and submit this today, and worse case it should be done mid week.

    Regards,

    John A
     
  36. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Yup I've got the project and will be checking it out sometime today.

    Cheers,

    John A
     
  37. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Looooooong day, but the code for the ladders is done. I will spend tomorrow evening testing (and maybe creating some more samples) and then submit it.
     
  38. Dan_Tsukasa

    Dan_Tsukasa

    Joined:
    Jan 26, 2013
    Posts:
    155
    Thats awesome man, will the update in the next few days include any of the following?

    • 2D Rope sample
    • 2D Push/Pull
    • 2D additions in General (suddenly can't remember anything specific)

    If not, thats not a problem, those are the things I'm looking forward to, but the Mechanim and new ladders should be interesting too.
     
  39. ChazBass

    ChazBass

    Joined:
    Jul 14, 2013
    Posts:
    153
    Thanks, JohnnyA! Look forward to seeing the update. I should have also mentioned that I have learned a lot working through you already have in there. Keep up the good work!
     
  40. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Nope only ladders and a few extra platform types.

    Push Pull is next on the list and shouldn't be more than two weeks away at worst (the box demo from youtube needs a little cleaning up and also want to do some physics based samples to show the other way of doing it).

    The 2D guy climbing ropes and ledges seems to have disappeared from my hard drive, but thats very easy to set up again if I used 2D Toolkit. No promises but it could be done within the week.

    - John A
     
  41. rygaar

    rygaar

    Joined:
    Mar 28, 2009
    Posts:
    63
    When will the mecanim version be released?

    cheers
     
  42. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hi Rygaar,

    I'm hoping Mecanim will be done in 3-4 weeks. This wont the "full" solution with IK, etc, but will be comparable to the HeroDemo's but configured with Mecanim with some samples of retagetting the character, etc.

    Note that I do have a basic sample (i.e. basic graph with walking, jumping, double jumping, ledge climbing states) which you are welcome to if you send me your invoice number. Note that the hero animations mostly work with mecanim, although ledge climb is a little off.

    Regards,
    John A
     
  43. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    An update, ladder testing is done. I'm still missing a few animations that I would like but its good for enough for 1.7.0 submission (animation clean up/extra animations can come in 1.7.1). Final steps... update the doco.

    - John A
     
  44. rygaar

    rygaar

    Joined:
    Mar 28, 2009
    Posts:
    63
    Thanks for the update John. I look forward to the upcoming release.

    Cheers
     
  45. odolphie

    odolphie

    Joined:
    May 22, 2013
    Posts:
    10
    Thanks so much, this works great for the character jumping onto it, if the character walks onto it however it takes a second to respond, it then bounces them up. Any ideas?
     
  46. Dan_Tsukasa

    Dan_Tsukasa

    Joined:
    Jan 26, 2013
    Posts:
    155
    I've never been able to get the 'Align Feet' button to work, it appears to never do anything, even when I use the Hero Prefab and move around a few bits for fun.

    This isn't so much a feature request as a general question, is there any way to get the colliders for the character to scale up correctly along with the model/sprite at all?
     
  47. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hi Dan, align feet simply makes sure each foot collider is the same length, not very clever.

    The editor GUI stuff does seem a bit buggy, it hasn't got much love as no one has complained and I rarely use it (I typically drag one collider to the right spot then manually adjust the rest).

    I have been thinking about adding some kind of auto generate collider option (which checks out the animation frames and makes a best guess for the position... or just uses the bounding box), but it seems low priority compared to main features.

    As to a simple auto scaling that should be pretty straight forward.

    In the end its just a question of time. I might try to get some clean-up in to that area in the next week or so (but no guarantees unless I get a bunch of complaints).

    - John A
     
  48. Dan_Tsukasa

    Dan_Tsukasa

    Joined:
    Jan 26, 2013
    Posts:
    155
    Hey Johnny, it appears that it doesn't even align each foot collider when I use it, though I just did what you do, adjusted the values manually so they're all the same.

    Auto Generate collider sounds cool, though one ting I've always wondered about colliders, the side of the character doing a kick isn't the same as the size of a character doing an idle stance, I know in TK2D you can simply set the collider for the actual frame itself (not sure if this is more memory intensive though), but for 3D models I've always wondered just how people in unity do it.

    Auto scaling sounds great! It's not an issue at all, just a few extra minutes of fiddling about is all, nothing anyone could really complain about.
     
  49. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    I used Johnny's basic sample as a base and it was pretty simple to get it setup on mecanim. It seemed simpler to me to leave the all the raycast character controller stuff on one layer and put all my other animations on different layers to make sure it stays in sync with the character controller state and I just override the animation if needed. Actually updating the controller layer is just a couple lines of code it is actually kinda amazing how straight forward it is.

    Using it in this:
    [video=youtube_share;twoFxtaTONI]http://youtu.be/twoFxtaTONI
     
  50. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Does your Plugin work on Blackberry, Windows Store and Windows Phone?