Search Unity

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v8.0 : advanced damage system]

Discussion in 'Assets and Asset Store' started by reuno, Dec 18, 2014.

  1. Jkc_dev

    Jkc_dev

    Joined:
    Apr 20, 2015
    Posts:
    35
    I had the same problem. It took me various headackes till I found what was going on.
    It's because of the way to Flip the character. With the old version, you are flipping the raycasts too, and somehow breaks the system. With the new version you are only flipping the sprite renderer component.

    Old version (problem):
    Code (CSharp):
    1. transform.localScale = newVector3(-transform.localScale.x, transform.localScale.y, transform.localScale.z);
    2. IsFacingRight = transform.localScale.x > 0;
    New version (no problem):
    Code (CSharp):
    1. if(CharacterModel !=null)
    2. {
    3.   CharacterModel.transform.localScale = Vector3.Scale(CharacterModel.transform.localScale, FlipValue);
    4. }
    5. else
    6. {
    7.   //if spriterenderer based, flipX attribute
    8.   if(_spriteRenderer != null)
    9.   {
    10.     _spriteRenderer.flipX =! _spriteRenderer.flipX;
    11.   }
    12. }
    13. IsFacingRight =! IsFacingRight;
     
    Last edited: Nov 13, 2016
    JeffSLG likes this.
  2. addz92

    addz92

    Joined:
    Mar 4, 2015
    Posts:
    19
    Hi all, I've just downloaded the engine and its amazing!
    I've just made a level to tinker with things, so a new scene. My question is how do I get to this scene from the level select screen? I put the level I made's name into the "Level name" parameter in the Level selector (script) on the inspector. But it leads to an infinite loading screen.

    So I was wondering how to load up lots of different levels from the level select screen? Is there something that each level/scene needs to include?

    Any and all help is much appreciated! (I'm a unity beginner 0: } )
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cereal_Killa > Sorry for the late reply, I'm traveling this week so don't have constant internet access.
    There's no "bug" here, meaning that the engine is behaving as expected. What happens is actually exactly what @NeatWolf mentioned. Jumping down platforms disables collisions with the type of platforms you're jumping down from. It used to reference only the platform you were jumping down, but this could cause issues in some setups. Now in this case I should just tweak the duration on that demo to fix it. But I guess I could simply add an option to accomodate both situations, so you could select the behaviour that fits your gameplay the most. I'll add that to the next version (after 3.0 that is, as it's already been submitted).
    @addz92 > And don't you get an error ? Because you're probably getting one, that tells you to add this level to your build. If that's not it, I'll need more info, send me an email with more details on the support email, thanks!
     
    Stevepunk likes this.
  4. addz92

    addz92

    Joined:
    Mar 4, 2015
    Posts:
    19
    @reuno thanks! That was the problem , I hadn't added the scene in the build settings. Thanks for the help :D
     
    reuno likes this.
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    Great news everyone, v3.0 just hit the store!
    It's a major release, that changes and adds a lot of stuff.
    So if you update, make sure you backup your project first, as the update WILL break your existing characters (and some other minor stuff probably).
    You'll need to recreate them. Fortunately, there's a complete (and new) documentation about creating characters available at http://reunono.github.io/CorgiEngine/how-to-create-character.html (check out the rest of the documentation by the way). I found a good way to do it is to take a screenshot of your character's settings, update to the new version, recreate the character and then tweak settings to match your screenshot's values.

    This new version has gone through a month long beta period, and is now really stable, but if you do find weird stuff, please send me an email with details on the support email address, thanks!

    And here's a full list of the new stuff :

    NEW FEATURES
    • Adds local multiplayer support
    • Adds TheHunt, a demo 4vs4 multiplayer 3D level
    • Completely new weapon system. Now you can create any weapon you want, whether melee or projectile based. Aim has been reworked too, with the addition of mouse support, and twin stick mode. You can even add a crosshair to make sure you aim where you want.
    • Adds laser sight to weapons
    • Adds bi-directional ladders (think Super Mario World fence)
    • Adds (optional) health bars, either always visible or only shown after a hit for a custom duration
    • Adds "Generate Character" button on Characters, that will automatically generate AI or Player Characters, with all settings and components, ready to play
    • Adds a new simple class you can add to any object and it'll respawn on player's death (and removes the old corresponding system)
    • Adds an option for bonus blocks to reset on player respawn
    • Adds a default animation controller, to serve as a basis so you don't have to copy/paste all the animation parameters
    • Adds WallClingingOverrides : you can now make a particular wall impossible to wallcling to, or more or less slippery than a regular wall.
    • Adds a new PickableItem class so you can easily create your own coins and stuff
    IMPROVEMENTS
    • Complete performance overhaul, now even more mobile friendly
    • Adds modular behaviour components for characters
    • Adds state machine
    • Adds events when entering/exiting states (and more)
    • New input manager class, with easier setup and new support for axis as buttons (xbox triggers for example), and direct choice between D-pad or joystick
    • Improved ladders : easier setup, more consistent behaviour
    • Improves progress bars, simplifying setup and use
    • Greatly simplifies the health and damage system
    • Improves health system : easier setup and more options (invincibility frames duration, knockback force on hit, flicker duration, etc)
    • Better dash : now distance based, for more consistent behaviour
    • Improves checkpoints, now collider based, chainable (you define their order), and now working on x, y or z axis for respawns
    • Simplifies AI scripts, combining AISimpleWalk and AIMoveOnSight into AIWalk
    • Adds an option to set the font on the dialogue zone directly
    • Adds an option to force grounded state on button activated elements
    DOCUMENTATION
    • Adds a new, complete, functional documentation
    • Adds lots of help boxes to most components
    • Adds a menu that allows to hide/show help texts in the inspector, and provides links to documentation, videos etc
    • Adds 100% comments code coverage
    BUGFIXES
    • Fixes a character flicker bug
    • The engine will now emit warnings if the level manager is not setup properly
    • Moving platforms can now be used and duplicated like regular prefabs, no more need for breaking them

    I hope you'll like this new version, again make sure you backup your project if you're updating from an older version.
     
  6. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Yay! I can finally start working on my project!

    Is it normal that the Character folder appears to be empty when importing it?
    upload_2016-11-15_23-39-58.png
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > I wouldn't say "normal" but don't worry about it. There shouldn't be a Character folder there. I think it's a .meta file that's messing with you. You should be fine.
     
    NeatWolf likes this.
  8. mahdijj

    mahdijj

    Joined:
    Sep 24, 2015
    Posts:
    31
    it is possible change local multiplayer game to network multiplayer game?
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @mahdijj > That's not something that's included in the asset right now. So far it's only local (same computer/console) multiplayer. The reason for that is that I've found unity network to be too unreliable for fast action platformers. But with 3.0 it provides a solid foundation for implementing that if you want to. The engine won't get in your way, and the current local multiplayer examples can give you a good basis to work with.
     
  10. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I've just finished reimporting everything but looks like that using most up to date Spine runtimes gives a few issues:
    upload_2016-11-16_0-23-24.png

    Also, trying to clear up the console, I still get (and so can't compile the project anymore):

    upload_2016-11-16_0-24-25.png

    Is there anything I can do? I'm using Unity Perpetual Pro license, v5.4.2f2 (64bit) on Win7 Ultimate SP1 64bit
    Latest Spine unity runtimes (3.4) if I'm not wrong.

    What should I be doing? I don't want to roll back to such an older version of the Spine Runtimes.
    What about the last 2 errors?

    Thanks for your time.
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > I haven't tried updating the spine runtime (I don't use it anymore). I guess you can just remove the corgi based spine characters. You'll be fine then.
    About the last 2 errors, I have no idea, never ran into them. Don't see why you'd get them. Have you modified these files somehow ? Does this happen when importing in a blank project ?
    If you have more errors, please use the support email, thanks.
     
  12. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Well, sure, but I won't be able to try the Examples and their implementation of Spine to learn from them. I need to use Spine in my project, and the samples in the package are using an extremely old versiorn of the runtimes...

    I only imported them on an existing project, didn't modify anything. Building for Android. I haven't tried that on an empty project yet. I'll give you more info tomorrow by email.
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > I'll upgrade to the latest version of Spine in the next update, but in the meantime you're not missing out on much, they're just like the base spritesheet character, only using spine to show that you can, other than that there's not much to them. If you really want to try them out, just do that in a blank project.
     
  14. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I imported Corgi2D on a clean virgin 2D project at the moment of creation (that is, adding it in the "new project" window) and only gave me this warnings:

    upload_2016-11-16_12-23-9.png

    About the last 2 errors of the other post, I was already using the SingletonPerfect asset from the store, and it was conflicting with the Singleton class already present.

    Adding a namespace to SingletonPerfect's Singleton solved the issue. I'll be asking the creator of the class to actually enclose it in its own namespace.
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > I don't get these last warnings but I'll look into that.
    That singleton thing makes sense, I'm glad you've figured it out :)
     
  16. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I really only created a 2D project with that only single asset. I imported the corgi engine during the project creation (adding it directly to the list of asset that had to be imported)
    If that could help, I'm using Unity Perpetual Pro license, v5.4.2f2 (64bit) on Win7 Ultimate SP1 64bit
     
    reuno likes this.
  17. tysonwills

    tysonwills

    Joined:
    Oct 30, 2016
    Posts:
    14
    In version 3 When I try and select the projectile image for the enemy shoot when in sight object the asset folder appears empty am I doing something wrong
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @tysonwills > I don't understand what you're trying to do :)
    Could you send me more information about that on the support email address? Thanks!
     
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I also get those mesh warnings in a new, empty Unity 5.4.1 project on Windows 10 64-bit. It doesn't seem to cause any problems, and other than that this looks to be a great update! Wonderful job!

    (BTW, for those who use the Dialogue System with Corgi, the example integration scene on the Dialogue System Extras page has been updated for Corgi 3.0.)
     
    NeatWolf, rrahim and reuno like this.
  20. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi @reuno ,

    I think I found a bug. Or maybe I'm not understanding a feature.
    Using the Rectangle prefab as the base for a new character, I was experimenting with a simple, minimal level.
    Usually the camera tries to anticipate the character, providing an extra offset in the direction of the movement.
    This seems to be working the first 1-3 times. Then something happens and the camera falls behind and is also late in following the player.
    Here's a video (Android 6.0) showing the issue. But I get the same result in Play Mode as well:

    EDIT: unable to reproduce the issue anymore.


    I also have a few questions:

    1) I'm going to use the Spine Runtimes in my project. Yet, when I look at the included samples, they contain *baked* Spine assets. Yes, there are also the source files included, but my question is:
    Does Corgi 3.0 also support characters using non-baked Spine characters, which actually use the Spine Runtimes?
    I understand you couldn't include a sample scene which can't work without everchanging third party content but, since generic compatibility with Spine is advertised, could you please also provide a separate, on request, downloadable example scene featuring the Corgi Character animated using the runtime version, or describe in detail which extra steps are needed to implement the Spine runtimes with a Corgi character?

    2) What's the easiest, cleanest way to force the player input of a Corgi powered character to move in a specific direction (I'd need to implement this to create cutscenes)?

    3) The character slows down when walking up a slope, and accelerates while walking down. Is this the intended and only available movement type? Is there a way to remove this functionality and have the player walk with constant X velocity, without taking into account slopes and the acceleration caused by gravity?

    Thanks in advance :)
     
    Last edited: Nov 19, 2016
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > I can't include non baked examples not because the spine runtimes are changing, but because their license prevents me from redistributing it. So no, there won't be one. That said, you can use any animation system you want, it's generic Unity, the engine doesn't handle animation any differently than any other project.
    2 > Call any movement method (see documentation for more).
    3 > Again, see the documentation (or even the character's inspector), you can define the slope speed from the controller's inspector :
    upload_2016-11-19_23-5-28.png
     
  22. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Duh, I totally missed that part, sorry, there are really tons of behaviours now to check, and I missed the expandable Default Parameter line :p (and honestly, I really love this kind of modular approach).

    I'm still unable to reproduce the camera issue with a 100% chance, but I'm working on it, it still happens. Don't know what's triggering it.

    Thanks for your support.

    Cheers.
     
    Last edited: Nov 20, 2016
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > Oh it's no problem, there are indeed a lot of possible places to check, you were right to ask :) I was just pointing out where the information could be found.

    Regarding the movement it all depends on what you want to do, but for example for movement you can call the CharacterHorizontalMovement's SetHorizontalMove method. You can look at the AI classes (AIFollow, AIWalk for examples on how to move a character without player's input).

    Not sure I understand that last sentence though. That whole last page of the thread is just me answering your questions, isn't it (and there are 38 others, not counting the emails). Is that single-word support? That doesn't really seem fair.
     
  24. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    You're right, sorry, my response was biased by stuff happening outside of the forum, so I misinterpreted the tone of your answer because of that. Humble apologies :)

    Thanks for your support,
    Cheers.
     
    reuno likes this.
  25. Jkc_dev

    Jkc_dev

    Joined:
    Apr 20, 2015
    Posts:
    35
    Hi @reuno, ¿is it possible to come back to a previous version of the asset? I haven't a copy and I want the previous version of the v3 Corgi asset.

    Thanks.
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Jkc_dev > There's only one version of the v3, and that's the one on the store, so I'm not sure what version you mean.
    You still can get (for a limited time) a pre-v3 version using Unity 5.3.5 (or any other version between that and 5.4.1). The Asset Store doesn't offer options to distribute older versions, sorry.
     
    Jkc_dev likes this.
  27. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi,

    I managed to record a movie about the little issue with the camera offset I found.

    On start it all works as intended. But. In a manner that is apparently random, the camera stops to anticipate the character's movement, and in some cases even strives to follow the player, staying behind him.

    Here's a private video showing it:


    Sometimes it happens in a few seconds, other times it seems to work fine, I wasn't able to determine what triggers it.
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > I'd need to be able to reproduce it to fix it. I've never run into this, and it's never been reported (the camera script has stayed the same for years now, so it's quite stable). If you find a way to reproduce it on any of the demo levels (without script changes) I'll be able to fix this.
     
  29. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Well, I'm not surprised, it's been a life that corner case bugs and glitches have been coming to me spontaneously. I did a lot of beta testing for myself and other companies so I'm used to this :p

    Anyway, I could have just messed up the values in a way that triggers this behaviour. I still don't know.

    And, this may be tied to some changes made in 3.0, released a few days ago.

    This is just the "Minimal" sample scene shipped with Corgi, with just a little zoom in, the same colliders used in the scenes but positioned differently, the same mobile controls, but hidden and moved to the edges, different shaders and background.

    No scripts have been changed.

    I'll try to reproduce it with the shipped example.
     
    Last edited: Nov 20, 2016
    reuno likes this.
  30. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I replicated it again, starting from the Minimal Scene example.

    I reduced the level boundaries.
    Deactivated most of the character's behaviours
    Tweaked its base movement
    Changed camera settings
    The character's drag is set to 1 (but shouldn't have any effect, this is a leftover from when I was trying to figure out how to remove acceleration).

    Move left and right using the touch buttons with the mouse (switch the Platform to Android), and the camera all of a sudden becames lazy, works randomly and erratically.

    Here are the screens:
    upload_2016-11-20_17-9-45.png

    upload_2016-11-20_17-10-22.png

    upload_2016-11-20_17-11-59.png

    upload_2016-11-20_17-12-49.png

    What hasn't been changed hasn't been expanded.

    I can also send you a package containing the scene and the modified player prefab, if you've got at least Unity 5.4.2f2, or, I can also send you a video, and an Android build.
     
    Last edited: Nov 20, 2016
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > I've played with these settings for a while, don't see anything wrong or unusual with the camera. I recorded a video, can send it to you via email if you want. Maybe I'm missing it. I've also asked some testers to try and reproduce it, none have managed to so far.
    Anyway, if you have more questions, please use the support email address, thanks.
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cereal_Killa > Just so you know, I've added an option to the next version to have platform exit detection for moving/1ways based either on the whole layer (as it is right now) or only the exited platform. This is set on each CorgiController, and I think it's an elegant way to handle all possible scenarios. Thanks for your feedback on this! The next version should be out in a few days/weeks, it fixes a few minor issues as well.
     
  33. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    That wasn't a question, and I have no questions to report privately, I was only try to help by reporting a weird camera behaviour I ran into, with the parameters I gave you, and even a video about the issue in action (which could possibly help to infer what's going on).

    I tried to give you all the needed info to make you suspect that something wrong is going on or could be going on, or, that by setting certain values the camera follow script begins to behave weirldy, suggesting that some extra consideration should be put into the code to handle corner case situations (I wouldn't call it corner case tho, since I changed the values only slightly).

    I'm done with the bug report, I hope you appreciated the efforts and hope the info I gave you may be of help. :)

    Cheers.
     
    Last edited: Nov 20, 2016
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > Well yes, I did reproduce these settings, and tested for a while. As I said, I have a video at the ready if you want. I tested for a few minutes. I don't really understand why you're so aggressive. I stopped everything I was doing to help you, and even asked others to look at that problem. Thanks for the info and all, but I don't see any problem on my machine. Maybe others will. Now if you don't want my help and just doubt me everytime I try to reach out to you, I don't know what else I can do, sorry.
    Edit : that message doesn't really make sense now that you've edited yours, does it?
     
    Last edited: Nov 20, 2016
  35. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I didn't mean to be aggressive, I actually took several hours in different days trying to figure out what was going on, just to discover I wasn't doing anything wrong, and stopped working on my project to provide all the possible info and proofs about a issue I found, also happening on a blank project tweaked in the way I've shown.
    I appreciate your efforts in trying to reproduce the issue of the engine you're selling, but I'll let other people use their time to report future issues, at least for a while, since it seems evident you've already got several testers to count on in such circumstances.:)

    Kind Regards
     
    Last edited: Nov 20, 2016
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > the engine has been on sale for 2 years. Granted, it's changed a lot since the beginning, but it can count on a solid userbase. I get regular bug reports, I have a slack with some users and dev friends, there's this forum, there's the beta program. The slack people help me reproducing stuff like your issue and I help them with their projects (and we talk about random stuff). When I saw your issue I posted it on that slack, two people gave it a try (it doesn't really take long to reproduce these settings when you're used to it). They didn't reproduce it. I spent more time on it, didn't reproduce it.

    That doesn't mean there's no issue here. Maybe there's a problem and I'm just not seeing it. Maybe you're expecting a different behaviour from what I consider normal. That's why I offered to send you the video of my test.

    Now it's Sunday afternoon here. I could be doing something else with my time (and I was), but I stopped to help. Yet you even doubted I did. That's the last time I accept that kind of tone. Again, we can continue discussing this issue and others via email, as I proposed. You can look at that video, maybe explain what I'm missing, and if I manage to reproduce it, then it's officially a bug, it becomes top priority and will get fixed super fast hopefully. You can even get the fix before everyone else if you want, that's what people who report bugs usually get, seems normal to me.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    To @NeatWolf and others who may want (recent) Spine examples : I just had a look at Spine's latest version, and potential license changes. From what I understand, the baking way I used to bypass the license thing doesn't even exist anymore, and their license still prevents me from including "real" Spine examples in the asset. So until they update their license there isn't much I can do. Having the latest runtime won't trigger any error as long as you don't try fiddling with the (now old) demo spine files.
     
  38. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi @reuno,

    there must have been a misunderstanding. I only asked for an example using the runtimes, not necessarily to be shipped with the Corgi package but as a simple .unitypackage only containing references to a Spine model to be shared in private. But I'll take my time to experiment, it's not important anymore.

    upload_2016-11-20_20-58-59.png

    Yes, it still supports baking.



    Importing the Corgi Engine after the runtimes does indeed throw a bunch of errors and warnings, but they won't be affecting the project, unless you plan using the shipped non-baked spine characters with the last stable build of the Spine runtimes.
    Using baked Spine characters does indeed work as per the usual animations in Unity. Using runtime characters along with CE, I suspect should have some difference, but I'll figure it out, I'm not asking support for this anymore.


    I'm glad you're offering your customers, all of them, adequate and non rushed support, as per Terms of Use as a consequence of a purchase (unlike Sonicether did, disappearing for a year), and that all the code is working smoothly for everyone but me, even starting from a fresh new project with the above reported tweaks:



    I have no more questions or requests, I believe you already dedicated me enough time, also considering that my dry humor got perceived as an aggression - thanks for staying professional without making it personal, and for providing support nonetheless :)

    Keep up with the good work, I'm looking forward the next updates :)

    Best Regards,
    Alessandro Salvati
     
    reuno likes this.
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    That's weird, I don't have any baking options (latest runtime, exported from the latest Spine release) :
    upload_2016-11-20_21-49-7.png

    I guess I need to research this more then. I'll see if I can find a way to redistribute a character without the runtime then.
     
  40. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I could be wrong. My "latest stable" was the one available until a few hours ago, they just updated the runtimes.
     
    reuno likes this.
  41. Jason-B

    Jason-B

    Joined:
    Dec 13, 2014
    Posts:
    5
    Hi, Just bought the Corgi Engine.

    Is it possible to put gamepad support in the pause menu for a future release please?

    Thank you!
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Jason-B > That's a very good idea. Added to the list, thanks!
     
  43. Jason-B

    Jason-B

    Joined:
    Dec 13, 2014
    Posts:
    5
    Oh thank you so much!
     
  44. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi, I did some research and I've found that the feature has only be hidden:

    We've disabled it by default in 3.5 because where it previously was located was confusing beginners who thought it was required, or confused it with SkeletonAnimator.

    If you want to use it, open SkeletonDataAssetInspector.cs and uncomment the define near the top of the file:
    //#define SPINE_BAKING
    I also have one question:

    I'm kind of managing to use Spine and Corgi together. But I'm facing got a problem:
    since the collider is a Box Collider 2D, and I want it to have it of the appropriate size, when walking up a slope the back leg of the character stays suspended in the air and really doesn't look good.

    The character feet are pretty distant one from the other since the character is not really drawn from a side, but instead he's facing a little to the camera, with a broad solid stance.

    I reduced the size of the collider to a thin vertical line, but this way the character would stick to walls too much.

    I also implemented IK, so that the feet follow the ramp, but they only rise vertically and upwards (maybe for some limitation, I'll make a feature request or look if I can extend the leg down - but still I can't stretch the leg), and the back leg still remains floating.

    I really don't know how to handle this. Somehow the character should ignore some of the colliders at feet height and stick to the slope a little better. Maybe pivoting the collision point at the center or, even better, a bit on the left when facing right.

    Do you have any idea on how to solve this? Is it possible to use poligonal colliders that flip with the character?
    If yes, I could use a rectangle with the bottom right corner rised a little (a trapezoid), so that the character would stick better to the ground. And of course this should flip when he turns the other side

    Thank you
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > Good find! That's why I didn't see that baking option. I think the old/existing characters don't need rebaking, that wouldn't change anything. But I'd like to be able to offer a "real" spine character. I need to figure out a way that would allow users to add the runtime themselves, but which wouldn't trigger any error to people who don't care about that, and that wouldn't create confusion for everyone. It's on my todo list (relatively low, but still).

    The character will only work (properly) with a single box collider. That's by design, as that's the case in all the games the engine takes its inspiration from.

    That said, it's good practice to separate visuals and collisions. Meaning that in this case if you're going for some "realistic" look (and in that case maybe a physics based engine would be a better choice depending on what your target render is), you should probably have a separate script that handles the visual behaviour of the legs. With spine it's relatively easy to do with IK. I guess the way I'd do it is cast rays downwards from the hips, detect ground position at these points, and have the feet rest there.
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NeatWolf > Quick and dirty (and edited) mockup of what I mean :
    upload_2016-11-21_20-58-43.png
    Green box is the box collider, red lines are the raycasts used to detect resting feet position.
     
  47. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Yes, but the problem is: if the player's legs are so long to exit the collision box, when he continues to walk on a flat surface he'll need to bend his knees to the point of crawling.

    It could be useful if you could climb a slope by having the collider positioned at the lower possible collision point. In this case, it is the point you get by raycasting down the bottom left corner of the green rectangle.

    I know another engine that uses a different approach, letting you define the shape of each side of the rectangle. I know it would be uber time consuming to code it, but would be nice to have.

    I'll try to find some alternative solution in the meantime (maybe blending the animation with another specifically built for slopes, with the full body offsetted down.)

    BTW: I fixed the "erratic camera issue" by Increasing the Horizontal Look Distance, decreasing by half the Look Ahead Trigger, and increasing the Camera Speed.
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    A few months back I wanted to include a "legs stick to the ground" option, but that required a Spine character (there are probably alternatives but that's the only good one I know. Again, that runtime thing prevented me to add it properly. Your points are very valid. Maybe you could adjust the waist's vertical position inside the collider according to the slope angle?
    I'm glad you fixed that camera issue :)
     
  49. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    It's already present in the Spine runtimes :)
    upload_2016-11-22_0-7-1.png
    What it doesn't do, is to extend the leg to a position lower than the original pose. It's probably clamped somewhere, I've already asked in the appropriate forums.

    Adjusting the waist height would mess up with the character's hitbox. I should be resizing the hitbox as well, but I see that if I do that at runtime, Corgi doesn't consider the character grounded anymore, and it triggers the falling animation.

    By the way, are you going to insert rotated characters support down in the roadmap? Like, rotating a Corgi character according to a slope or a curve in the terrain, for spider-like, Sonic-like movements?
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    Rotated characters have already been asked and are already on my list :)
    That's something I personally really like, and I know how I want to do it. So it'll be coming at some point.
    Edit : Didn't know about that spine script. I really need to get back to it!
     
    NeatWolf likes this.