Search Unity

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v6.0 : game feel, Cinemachine, and more]

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

  1. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    95
    I had the same issue...check your animator and make sure all your states are finite. I'd recommend making a new one and not using the one that came with the package.
     
    Last edited: Feb 1, 2019
    reuno likes this.
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @o0neza0o > Never heard of that issue, I'd need context to be able to help. On what demo can I reproduce the problem?
    @Candy-Bomber > Either disable flip on your Character component, or have both animations facing right, and let the Character component flip the left one. And in any case you'll probably want to use a different animator graph, this "any state" pattern is really for demo purposes, nothing more.
     
    Candy-Bomber likes this.
  3. Candy-Bomber

    Candy-Bomber

    Joined:
    May 21, 2015
    Posts:
    52
    Ah, thank you. I somehow missed the obvious flip character checkbox. Derp. Everything is working now.
     
    reuno likes this.
  4. achan_unity

    achan_unity

    Joined:
    Apr 23, 2018
    Posts:
    13
    Hello, I have an object that will break and re-appear in game. I added a death effect and a respawn effect, which works but the problem is those effects did not go away, instead more are being added and the replay the effect endlessly. Is there an option to destroy the effect or do I have to write someone to make it go away?

    Thanks, Allen
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @achan_unity > That's native in Unity, you can set that from your particle system settings. Alternatively you can use a script to do that.
     
  6. achan_unity

    achan_unity

    Joined:
    Apr 23, 2018
    Posts:
    13
    Thanks. I saw the MM Auto Destroy script - which I can add to the death effect.

    On the other, I saw in the code Health.cs, there is a line around DamageEffect that says
    "// When the character takes damage, we create an auto destroy hurt particle system".. Looking at the code, I don't understand how the auto destroy is being achieved as it appears those effects are hanging around.

    This is all it does:

    Instantiate(DamageEffect,transform.position,transform.rotation);
     
  7. z_gangan

    z_gangan

    Joined:
    Mar 9, 2017
    Posts:
    5
    I encountered the same problem in Unity 2018.3.4
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @achan_unity > I'm not sure I understand your question. Yes, the health script just instantiates an effect. It has nothing to do with auto destroy, and it shouldn't. That's handled, as mentioned before, either via another script, or via the particle system native way of auto destroying.
    @z_gangan > Please use the support email if you think you've found a bug, and provide some details (version you're running, steps to reproduce), thanks.
     
  9. z_gangan

    z_gangan

    Joined:
    Mar 9, 2017
    Posts:
    5
    Ok, I sent the mail.
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
  11. z_gangan

    z_gangan

    Joined:
    Mar 9, 2017
    Posts:
    5
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @z_gangan > The hint succeeded? What does this mean? I think I got your email though, but as I answered, please provide at least some info, I have no idea what you mean to say, or how to reproduce your problem.
     
  13. z_gangan

    z_gangan

    Joined:
    Mar 9, 2017
    Posts:
    5
    Please forgive me if I make any errors; my English is a little weak.
    https://imgur.com/RAMN7Bx <----Look This Here's a demonstration.
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @z_gangan > Once again, please use the support email to report bugs, and please explain your problem, I don't see nothing wrong with this video. Press play and you'll see your damage area just fine.
     
  15. z_gangan

    z_gangan

    Joined:
    Mar 9, 2017
    Posts:
    5
    I want to configure a melee weapon but the editor does not show the damage area gizmo, the gizmo is only seen in playmode.
     
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @z_gangan > That's normal, that's how it works. And for the last time, please use the support email.
     
    z_gangan and ScourgeGames like this.
  17. jeffreyjene

    jeffreyjene

    Joined:
    Jul 9, 2018
    Posts:
    3
    Hello,

    Has anyone had any issues with the animator repeatedly firing transitions from "Any State" to the targeted animation? For example, when I'm "idle" the transition should only fire once until I've moved but instead fires again and again, causing the animation to start over and "stutter". I've checked my settings all over and can find nothing that looks incorrect, but there has to be something. I'm not even sure if this is a Corgi related issue.
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @jeffreyjene > Nothing to do with the engine, it's just standard Unity animator.
    You probably have something wrong setup on your transition (likely "Can Transition to Self" is checked - it shouldn't, but really it's just a wild guess without any info). Don't hesitate to read Unity's documentation about transitions to learn more about it. You can also compare with the examples provided with the engine for reference.
     
  19. jeffreyjene

    jeffreyjene

    Joined:
    Jul 9, 2018
    Posts:
    3
    Ugh that's exactly what it was, can't believe I missed it. Thanks!
     
  20. jeffreyjene

    jeffreyjene

    Joined:
    Jul 9, 2018
    Posts:
    3
    As I work through the Corgi docs I was wondering if there is any way to eliminate the "slow-in" and "slow-out" of the character movements. Just a tiny pressure on the stick will cause a slow movement in the character that doesn't match the running animation I'm using. I want the raw data from the stick to set the motion to full right away. Is there any built in way to do this?
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @jeffreyjene > That's coming to the next version as a simple checkbox. It's doable in the meantime, but I'd suggest waiting for it. If you don't want to wait, drop me a line on the support email and I'll explain how to do it.
     
    ScourgeGames and Pacaworks like this.
  22. borkbork

    borkbork

    Joined:
    Jul 5, 2014
    Posts:
    32
    hassonhamo3 and Pacaworks like this.
  23. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    141
    Yeah,that is exactly what I ask for... Like springs in many 2d platform games, which can automatically eject the player by a given force:)
     
  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @Bagazi > Then as I said at the time, you should look at the Jumper class.
     
  25. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    141
    Oh,I see:) And is there a demo about jumper? Cause animaiton ,effect should be handled in that case...
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @Bagazi > Yes, you'll find jumpers in multiple places in the demos. FeaturesPlatforms, Mesa1, among others. It doesn't come with an animation, but you can easily extend the class to trigger one, it's a one liner.
     
  27. Pacaworks

    Pacaworks

    Joined:
    Jan 28, 2016
    Posts:
    12
    Hey! Just a quick question on your future plans! @reuno

    Are you planning on upgrading the current water to have dynamic edges or waves? Is there any kind of water update going on? I mean, the current water mechanic is magnifique, just wondering if there's any plan on dynamic water! :)


    Thanks for your attention!
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @AesopWorks > No plans for that so far, it's super low on the todo list right now (and a bit outside the scope of the engine in my opinion).
     
    Pacaworks likes this.
  29. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    Since I can not get the support form working and I am not allowed to send private messages anymore I post my last support form email here:

    Hi!

    You just wrote me a PM that I should use email communication instead of a PM.
    So In case you did not read my last reply on PM I write it here also:

    Please add this behavior (proper respawn of enemies) to an upcoming version, because now it makes no sense.
    And please add a counter how often a respawn of an enemy should take place.

    I also have some suggestions for an upcoming version of the corgi engine:

    1. I did not find a function where the player is invulnerable for a period of time after respawn. (I have such aggressive enemies in my game that my player is immediately dead after respawn).

    2.The bullets of the player and the enemy should be faster when the player or enemy is moving (It makes no sense that a character can be faster than his own bullet)

    Accordng to the retrocopter:
    For me this character is the reason why I bought your engine in the first place. But it lacks basic abilities seen in classic helicopter games as choplifter and fort apocalypse for example:

    3. The retrocopter tilts when flying but it keeps shooting horizontal. That should be changed. The helicopter should be able to shoot at the same angle the helicopter is tilted while flying (ergo should be able to shoot in an angle while flying)

    4. The retrocopter should be able to turn only by button press. ..this means that the helicopter can shoot UP when flying backwards. Also the front of the retrocopter should be able to face the camera to shoot down 90 degrees (look at fort apocalypse for example, choplifter does a pseudo 3D shooting which also would be nice..but not necessary)

    5. The helicopter should not be allowed to move sideways while it is landed, only when it is in some distance in the air.



    Please look at classic helicopter games like choplifter or fort apocalypse for Commodore 64 to get a grip what I mean.

    Choplifter


    Fort Apocalypse


    These are some of the greatest classic retro games with a helicopter, you should know them anyway I guess.



    thanks
    Andy
     
    Last edited: Feb 6, 2019
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
  31. lsflet

    lsflet

    Joined:
    Aug 15, 2014
    Posts:
    6
    Hi, I would like to know whether the enemy AI can use combo weapon e.g. multiple continuously melee attacks with different damage areas ?
    And whether two different type of weapon can use at same time? for example , a melee attack move which also release a projectile weapon.
    Thanks for help.
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @lsflet > There's nothing preventing you to do that right now. It might require a few tweaks here and there, but overall should be quite straightforward.
    The AI can use combo weapons out of the box, you just need to setup the proper delays in your brain (no code required).
    As for the two weapons at once, you'll want to create a new action for that, targeting the Secondary Handle Weapon ability instead of the main one. Or you can have your AI change weapon the next frame, easier, but you'll have a one frame delay between both attacks. Negligible in most cases, but really depends on what you're after.
     
  33. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    164
    Ok 2 problems.

    The one on the box is him animating as he is jumping onto the box (seems to be a collision glitch).
    2nd one is i can dash through colliders for some reason... Is there a certain way to deal with colliders?

    Also, is there a way to have the same health throughout all scenes?
     

    Attached Files:

    Last edited: Feb 7, 2019
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @o0neza0o > I'm not sure I understand the problem on both images, I'd need more details.
    If you think you've found a bug, I'm happy to take a look.
    Please use the support email, and provide more details, and steps to reproduce the issue in any of the demo scenes, thanks
     
  35. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    164
    sent you the email.
     
  36. Bytewizards-SE

    Bytewizards-SE

    Joined:
    Aug 24, 2015
    Posts:
    14
    Finally back to working with this wonderful asset again but I do have a question:

    What would be the best way to extend CorgiEngine (without breaking functionality in case of a Corgi update) to be able to apply different types of damages like fire, acid or ice?
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @Bytewizards-SE > Good question!

    So every time something gets damage, a MMDamageTakenEvent is fired, which contains info about what gets damage, by what, for how much damage, and how much health the damaged thing is at now, and how much it was at previously.

    So a good way of doing things without having to extend any class or break any functionality would be to create on your damageable objects a new component, that listens for this event, looks at what made the damage (maybe create new classes for that as well), and applies the desired effect based on that.
     
    z_gangan and Bytewizards-SE like this.
  38. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    164
    Ok i fixed the animation glitch, it's cause i had dangling enabled. I am experiencing a new glitch as i'm using the Load Scene Mode called Additive. It keeps respawning the player, so i was wondering is there a way to have the level manager search for the correct player and spawn that player instead?
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @o0neza0o > I'm not sure I understand what you mean. What correct player? Again, please use the support email for this kind of questions, thanks! And provide some more explanations, I don't know what you're referring to :)
     
  40. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    164
    It's fine i think i should be fine. I'm rewriting the system so it's on me now xD
     
    reuno likes this.
  41. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    164
    I'm looking at trying to save the health across the scenes by using the level manager and the progress manager. I think thats possible anyway.
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @o0neza0o > You can use the SaveLoadManager class to do so.
     
  43. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    164
    i still wouldn't know how to use it xD. I'm very basic when it comes to that lol
     
  44. Meowx

    Meowx

    Joined:
    Oct 10, 2015
    Posts:
    24
    Heya Reuno, I've been holding off updating to 5.3 because I saw there were a couple issues that you said you'd fixed in the next update. Any idea when that will be released?
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @Meowx > I don't give ETAs, but reasonably, and hopefully, within a month :)
    If you really need a fix before that, drop me an email and I'll see what I can do. Some fixes are quite atomic and can be sent on their own, some have more impact on the code base and would be a mess to update without the whole thing.
     
    Meowx likes this.
  46. raingame_

    raingame_

    Joined:
    Jan 15, 2019
    Posts:
    8
    Hi, how can I freeze physics at some moments? I freeze all my animations by setting their TimeScale to 0, but I don't really get how I can to that with CorgiController. For Example when I call my Method "Freeze();" animation's timeScale is equal to 0, but I still can control my character. And also I need to save all the forces affecting on my character to bring them back after freezing process. I can't set Unity's TimeScale to 0, because I don't want everything (Ui, some animations) to be stopped.
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @raingame_ > Setting the timescale to 0 would be the only way to do that right now.
    You can use unscaled time (https://docs.unity3d.com/ScriptReference/AnimatorUpdateMode.UnscaledTime.html) to have your UI and animations keep playing in the meantime, that's how it's usually done.

    Alternatively you could code a class that freezes the Controller (that's already in, called Freeze) and stores all its forces and context, then reapplies it, but timescale will be much more robust.
     
  48. Negrat

    Negrat

    Joined:
    Oct 1, 2013
    Posts:
    9
    hey guys, noob question: how to detect a hold button for x seconds? for example I want the dash ability to start only if dash button is held for 0.5 sec.
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,034
    @Negrat > So it's not something that is built-in, but should be quite easy to implement.
    The first thing to do is to extend the CharacterDash ability into a new class, let's say CharacterDashCharged.
    In that new class, you'll want to extend HandleInput to have it work differently.
    HandleInput is called every frame, and as you may imagine, looks for input.
    In it you'll want to check if the button is pressed, and has been pressed before. The easiest way to do that is to keep track of a boolean and, over time, see if your button remains pressed. Let me know if you have trouble with that.
    In the meantime, here's an example of an ability that does the same thing (extend an ability to change how input works) that will be included in the next release :

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using MoreMountains.Tools;
    4.  
    5. namespace MoreMountains.CorgiEngine
    6. {
    7.     /// Add this class to a Character and it'll be able to dive by pressing down, pounding the ground in the process.
    8.     /// This class is derived from CharacterDive and shows how you can very simply extend an ability to change how it detects input
    9.     /// Animator parameters : Diving (bool)
    10.     [AddComponentMenu("Corgi Engine/Character/Abilities/Character Simple Dive")]
    11.     public class CharacterSimpleDive : CharacterDive
    12.     {
    13.         /// <summary>
    14.         /// We override input detection to have it simply look at the down direction
    15.         /// </summary>
    16.         protected override void HandleInput()
    17.         {
    18.             if (_verticalInput < -_inputManager.Threshold.y)
    19.             {
    20.                 InitiateDive();
    21.             }
    22.         }
    23.     }
    24. }
     
    ScourgeGames likes this.
  50. Negrat

    Negrat

    Joined:
    Oct 1, 2013
    Posts:
    9
    Thanks reuno, already implemented it using your advice :)
     
    reuno likes this.