Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v6.6 : ability split, recoil, hitscan...]

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

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @XavierSubsonic > Your choice of animation tech, or whether you're working with sprites, spine, 3D models, etc is completely separate from the logic, and entirely open.
    If you follow the guidelines and make sure you nest your character model correctly (see https://corgi-engine-docs.moremountains.com/character-classes.html#hierarchy-and-renderer), it'll work fine, regardless of what your model is, the engine is agnostic in that regard.

    But if you add new colliders, or rigidbodies, or don't follow the base structure, it'll (likely) break. Again, don't hesitate to use the support form if your issues persist, and provide enough info for me to reproduce your issue, thanks.
     
    XavierSubsonic likes this.
  2. XavierSubsonic

    XavierSubsonic

    Joined:
    Jan 18, 2020
    Posts:
    8
    Right, fixed it! was super easy. Sorry for wasting your time :S haha
    Thx
     
    reuno likes this.
  3. FNRocha

    FNRocha

    Joined:
    May 30, 2015
    Posts:
    7
    Hi everyone, I am having trouble making the animator controller with the MeleeCombo, I am using RetroComboSword prefab as an example but I am not finding a scene with a Melee combo example, does anyone know where I can find it?
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @FNRocha > You can use it in any scene, but it's pickable at the start of RetroAI for example.
     
  5. FNRocha

    FNRocha

    Joined:
    May 30, 2015
    Posts:
    7
    Thank you for the information. I do know it is usable in any scene, I am just looking for an example for setting up the animator controller. I am making a 3 slash combo, but the animation transitions are not responsive enough. I am guessing my animator controller is not properly set.

    my current set up is:

    weapon 1 - Start Animation parameter - > MeleeAttack1
    weapon 2 - Start Animation parameter - > MeleeAttack2
    weapon 3 - Start Animation parameter - > MeleeAttack3

    If I try to press the attack button very fast there is some delay between consecutive combo executions, I believe it is happening because when you finish MeleeAttack3 if the attack button is being pressed too fast it goes to MeleeAttack2 or MeleeAttack3.
     
    Last edited: Jan 24, 2021
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @FNRocha > That's indeed likely the case.
    I'd recommend reading Unity's documentation about transitions to learn more about how to tweak them :
    https://docs.unity3d.com/Manual/class-Transition.html
    And you can also look at how the RetroCorgi's animator is setup for an example of a responsive 3 attack combo.
     
    FNRocha likes this.
  7. FNRocha

    FNRocha

    Joined:
    May 30, 2015
    Posts:
    7
    It worked Noice!! I had some experience with animation transitions, but I was taught to avoid using AnyState.
    After using RetroCorgi's animator as a guide it was a simple matter. Thank you!
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @FNRocha > That's not bad advice :)
    It's really about knowing when it makes sense to use it or not!
     
  9. jdcbautista

    jdcbautista

    Joined:
    Jan 9, 2020
    Posts:
    3
    There are some funky jetpack behaviors that I can't seem to fix.

    Holding the jetpack input even after you've run out of fuel keeps your player in that reduced speed state. So if you're out of fuel, you can still hold the jetpack button to slow your fall. Holding jetpack input also slows down bullet speed, which does not make sense in any context.

    I've tried looking in the CharacterJetpack script but nothing I tweak seems to work. Also tried changing the conditional that enables the jetpack to also require fuel, but holding the jetpack input button slows the player regardless.

    Any suggestions?
     
  10. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    139
    No suggestions, just curious - does that only happen when the player is airborne? In other words, if out of fuel and grounded and holding button are you still seeing that behavior? Can you see what state your character is in when this is happening?
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @jdcbautista > I just tried it in a fresh install of v6.7, on Unity 2019.4.18f1, in the Mesa1 demo scene (same result in other demos as well), and can't seem to reproduce the problem :



    Keep pressing jetpack, you go up. Once out of fuel, state reverts to normal, you go back down, even with the button being kept pressed. Then after a while fuel starts coming back as expected, then gets consumed again, according to the cooldown settings (that's the tiny jetpack bursts). No impact on projectile speed (they're two separate systems, they don't communicate).

    If your issue persists, please don't hesitate to use the support form and provide exact repro steps, I'll be happy to investigate more.
     
  12. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    107
    Hello Everyone,

    Is there a way I can use the CharacterSwitchManager to switch to a specific character I want to? We have one main character which can change to a different character based on where you are walking closest by. But the only options I see are ranomized character switching or chronologically through a list. I want to switch to a specifc character.

    I hope to hear from you soon!
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
  14. jdcbautista

    jdcbautista

    Joined:
    Jan 9, 2020
    Posts:
    3
    It happened on the ground too.... But I found it was actually being caused by the time control component being on and mapped to the same joystick button as the jetpack by default.
     
    Boom_Shaka likes this.
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @jdcbautista > Ah that'd make a lot of sense. It does impact projectile speed and movement speed.
    In what demo were you testing that though? There shouldn't be one with both abilities active at once.
     
  16. jdcbautista

    jdcbautista

    Joined:
    Jan 9, 2020
    Posts:
    3
    It wasn't in any of the demos, so you're probably right there shouldn't be one. I just dragged the space-corgi-spritesheet prefab onto a blank scene and started tinkering from there, so it was an oversight on my part.
    Sorry for the false alarm, and thanks for taking time to test it on your end! :)
     
    reuno likes this.
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @jdcbautista > Alright then! But yes, with that many abilities, I've run out of buttons on gamepad, so there's a bit of tweaking to be done in the bindings if you need certain combinations :)
     
  18. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    107
    Sorry for not being clear. I want a way to let's say, switch to a character you click on. Not one that is either sequential or random. Let's say you have 4 characters, A, B, C and D, and you're currently playing A. Then you can click on either one of those others and switch to that specific character. That's not possible with the sequential or random approach.
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @Cambesa > No, indeed, the sequential option would go A then B then C, while the random would hop from A to C to A to B (or another random order).

    That's why I pointed you at the documentation of the method that lets you target a specific index, which you can also test straight from the inspector via the DebugCharacterSwitchToTargetIndex button.
     
  20. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    107
    I just downloaded the newest version but there is no SwitchCharacter method where you can pass an integer in the CharacterSwitchCharacter class. Only one coroutine that either switches random or sequential. I can not find the ForceSwitchcharacterTo method either like described in the documentation.
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
  22. Veritas

    Veritas

    Joined:
    Mar 18, 2014
    Posts:
    14
    This isn't necessarily specific to Corgi Engine but Unity is driving me nuts. With 30+ scripts on an object (usually characters with AI brains) Unity un-collapses everything when you hit play or deselect the object. This is infuriating since you need to (WAY too often) scroll to the bottom when messing with AI brain stuff. Is there a workaround to making everything collapsed by default when there are loads of scripts or am I just stuck having to collapse all components every time?
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @Veritas > This is indeed unrelated to the engine, and likely a bug in your specific version of Unity, never encountered this myself. I'd recommend reporting it to Unity.

    This is with 40 components on a single object :
    https://imgur.com/a/T94aRF0
     
  24. liquidsht

    liquidsht

    Joined:
    Jun 4, 2020
    Posts:
    49
    Hi Reuno,
    Thanks for the reply, I am playing with PixelRogue now, I can pick up the items but the items dont seem to save after i exit play mode? I used a new project with no other assets, and latest version of Corgi and Unity2020.1.6.
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @liquidsht > Without details it's hard to guess what you may be doing wrong.

    Here are steps following the explanations in the documentation, they seem to work fine :
    - fresh install of 2019.4.18f1 (2020.x is a mess)
    - import Corgi Engine v6.7
    - open the PixelRogueRoom1 demo scene
    - using the arrow keys, move over the coin and an apple
    - open your inventory, notice you've got a coin and an apple
    - move to the next room using the door at the top, to trigger a save event and a transition to a new scene
    - in the next room, open your inventory, notice it's unchanged
    - exit play mode, enter again, open your inventory, notice it's still unchanged

    If your issues persist, please provide similar steps via the support form, thanks.
     
  26. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    19
    hello
    I have a question about melee attacks.
    Is it possible to attack downwards from the air? No such setting was found in the melee component.
     
  27. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    107
    I'm running Unity version 2020.2.1f1 so that must be it. The latest corgi version is see in the package manager is v6.7 - January 06, 2021 but if I open the readme I read: v6.2.1. Would you recommend to download it through an older unity then copy it manually into the current project? It even states "currently downloaded v6.7" in the package manager.
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @Cambesa > I'd recommend checking the issue I linked you to, it'll explain your problem. It also contains a link to one of the threads on this forum covering the problem, where people share workarounds (looks like clearing your download cache would be the first thing to try). My recommendation would be to not use 2020.x, as it's riddled with bugs at the moment.
     
    Cambesa likes this.
  29. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    107
    Thanks for the help!
     
    reuno likes this.
  30. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    139
    set the damage area offset to a negative y value?
     
    reuno likes this.
  31. Veritas

    Veritas

    Joined:
    Mar 18, 2014
    Posts:
    14
    Darn, thanks!
     
    reuno likes this.
  32. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    19
    I'm sorry, I will supplement.

    If make a downward attack, you can certainly solve it with Offset, but I want it to exist separately from the left and right attacks.

    For example, I want to generate a downward attack when I press the crouch button and the attack at the same time.
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @mk7gwc > At the moment that's solved by having separate Weapons (a Weapon in the context of the engine defines an attack, not necessarily a weapon). You could have multiples Weapons for a single sword. The combo weapon is a good example of that.
     
    Boom_Shaka likes this.
  34. jean-rodrigues

    jean-rodrigues

    Joined:
    Jan 12, 2019
    Posts:
    8
    Hi,
    I am trying to install the AI Brain Extension from Bitcave but it cannot find the class AIActionSetLastKnownPositionAsTarget in Corgi Engine. I can see it in the documentation, but it is not available in my package download from Asset Store. Is there something I need to do to have it?
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @jean-rodrigues > I'd start by making sure you're running the latest version of the engine (that'd be 6.7, you can check which version you're on in the readme at the root of the Corgi Engine). And then I'd check this post (and the few ones after that), as maybe you're running into the same problem. If not, I'll need to know what version of Unity you're on.
     
  36. jean-rodrigues

    jean-rodrigues

    Joined:
    Jan 12, 2019
    Posts:
    8
    Thanks, I will try this. I am indeed using Unity 2020.2.1f1 and Corgi v6.6 [according to the readme] (the package manager says it is 6.7 though).
    Even with Unity 2019.4 LTS, I cannot download the last version of Corgi Engine.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @jean-rodrigues > The readme is (always) right, the package manager is wrong, and quite broken at the moment (see the issue I mentioned). Revert to 2019.4.18f1, clear your cache, and you should be good to go.
    It's a very, very annoying Unity bug.
     
  38. Veritas

    Veritas

    Joined:
    Mar 18, 2014
    Posts:
    14
    After trying to update unity to 2019 LTS then the latest 2020 version, I finally figured it out. Posting here for anyone who cares.

    Apparently, when you right click the inspector "tab" and click "collapse all" Unity doesn't save the state of the component's "collapse". You have to manually go and collapse each component for it to remember the state. What an awful bug!
     
  39. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    19

    Thank you I'll try.
     
    reuno likes this.
  40. jean-rodrigues

    jean-rodrigues

    Joined:
    Jan 12, 2019
    Posts:
    8
    Hello, not sure what is happening when I have AIActionMoveTowardsTarget in AI Brain. It raises a NullReferenceException and dont understand why. If I exchange it for AIActionPatrol, no problem happens.

    NullReferenceException happens here:
    public override void OnEnterState()
    {
    base.OnEnterState();
    >>>>> _characterHorizontalMovement.SetHorizontalMove(0f);
    }

    The way that code searchs for CharacterHorizontalMovement on both classes is the same, and they are attached to the same game object (with all proper configuration).

    Any clue?
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @jean-rodrigues > Without any context info, or repro steps, it's hard to guess what your issue may be. If the problem persists, please use the support form and provide steps to reproduce your problem, I'll be happy to have a look.
     
  42. ScotianWolf

    ScotianWolf

    Joined:
    Feb 3, 2021
    Posts:
    5
    Using the latest version of Corgi, And was just wondering if their was a way to use the " Level Selection " open one level, and lock the rest and unlock the other's as I progress through the levels. I know you can do it with the Retro Levels, But id like to use the level lay-outs of Mesa for an example
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @ScotianWolf > Sure, you can do so with any levels, the layout doesn't factor in that :)
     
  44. ScotianWolf

    ScotianWolf

    Joined:
    Feb 3, 2021
    Posts:
    5
    Could you please give me a hint on how to go about doing that? Thanks in advance, honestly the coolest asset I've ever used!
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @ScotianWolf > As explained in the documentation, progress management is usually tailored on a per game basis, and it's unrelated to level layout.

    But if you just want to have the layout of the Mesa1 demo in another one, that's extremely simple. Simply open the RetroAdventure1 demo level, drag the Mesa1 scene into its hierarchy panel, move the Mesa Level node into RetroAdventure1, then remove the Mesa1 scene.

    You'll likely have to adapt level bounds, as well as change the LevelManager's DebugSpawn, but that's all there is to it.
     
  46. pjooren

    pjooren

    Joined:
    Apr 12, 2017
    Posts:
    14
    I'm wondering if I'm missing something here, and maybe someone can help out with my problem. Hopefully it's something obvious that I'm just missing. I'm making multiple levels using the Rooms system, but I am also wanting to use multiple scenes. So I'm using the "Go to level entry point" to go to a Point of Entry in a room on a different scene. But when I go to that room the camera is no longer following my character, in fact it seems to go to the virtual camera with the highest priority, which is an issue if the Point of Entry is not in the room with that virtual camera. Also the room scripts doesn't seem to recognize the character and activate any of the game objects in the Activation List.

    You should be able to recreate my problem by making 2 copies of the RetroVania scenes, Placing the GateToNextLevel Prefabs from the Minimal/Prefabs folder in different rooms in each of those scenes. Set up the Finish Level component of those gates to point to each scene, and then add those gates as Points Of Entry in the LevelManager. Am I missing an important step?
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @pjooren > These are two independent systems at the moment. But don't hesitate to use the support form to request that feature and I'll add it to the next release.
     
  48. SRx734

    SRx734

    Joined:
    Sep 4, 2018
    Posts:
    5
    Hi reuno, I'm having trouble with Perform Safety Boxcast. If I check it in the Rectangle prefab and build the minimal level scene, the character stucks for a random duration of time before it can walk on the ground platform(the walking animation is playing). Things works fine in unity editor. I'm using Unity 2019.4.11f1 with the latest version of CorgiEngine.
    By the way, I'm having FPS loss when holding down any key in play mode. Is this a problem of unity itself?
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,047
    @SRx734 > I don't seem to reproduce that problem with a fresh install of v6.7 on 2019.4.18f1.

    And no, holding down a key shouldn't cause FPS loss. How are you measuring that, and in what context? I'd recommend getting profiling data on this to get a better idea of what's happening on your end. I did a bit of googling and didn't find much (https://www.reddit.com/r/Unity3D/comments/3fgkh0/lagfps_drop_when_pressing_keys/ for example). Maybe that'll help! You could also try that in an empty project, to see if it's a general Unity issue on your end or something that only happens when using the engine.

    If your issues persist, and if you manage to reproduce them in a fresh install of the engine, please use the support form and provide more info on how exactly I could reproduce them, I'll be happy to look further into it.
     
  50. RobbieHannah

    RobbieHannah

    Joined:
    Aug 1, 2019
    Posts:
    2
    Really quick question, and I have searched the documentation, this thread, and googled around, so apologies if the answer is out there, I just can't find it:

    Does Corgi Engine feature jump corner correction? Thanks.
     
    Grafos likes this.
unityunity