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. pandemik

    pandemik

    Joined:
    Mar 23, 2017
    Posts:
    11
    @reuno I thought that was the issue but i have unlimited lives and the gameover screen never initiates, its definitely something that i'm doing since it works correctly on a untouched build. Could it have something to do with me implementing a healthbar on the Retro Adventure demo?
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @pandemik > Hard to say for sure, but this looks completely unrelated to me.
    I'd suggest using debug tools to see on your build what the issue could be.
     
  3. unity_YoaP2NCvxCuybA

    unity_YoaP2NCvxCuybA

    Joined:
    Mar 16, 2019
    Posts:
    17
    reuno likes this.
  4. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    119
    Dear reuno, When I have the CharacterGravity component enabled, parenting the character to a rigidbody while keeping it's original position/rotation/scale does not work correctly. I'm using the
    public void SetParent(Transform parent, bool worldPositionStays);
    method with true as boolean. What happens is when the character touches the rigidbody while it is turned upside down and laying dormant, the character will be parented to that rigidbody and also be turned upside down and placed below the rigidbody as if the character stands with inverted gravity based on the rotation of the rigidbody. Aside from this, the character is also applying a force to the rigidbody even though Physics 2D Interation is turned off on the corgi controller. For now I made a quick hack that has the CharacterGravity component turned off all the time and when you jump off the rigidbody, it will be turned on for one frame so the global downwards gravity takes over again and the character falls correctly. That works allright for now however I would like it that the character does not influence the rigidbody when standing on it.
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cambesa > If you want to parent the character to something else, I'd suggest disabling its controller and all its parts entirely, it's not supposed to be controlled like that.
     
  6. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    119
    In our game, the character should be able to walk on top of the rigidbody so I can not disable the character components. I'm basically trying to make a moving platform that uses physics instead of paths. Using v6.2.1 btw. It's the core mechanic in the game, moving the rigidbody with one character and standing on it with another so I really hope it's possible.
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cambesa > You'll have to implement that feature then, that's not something that is built in.
    The engine is not physics based, that's its main feature, and what you describe would typically be a physics interaction.
    I can add that to the todo list if you'd like though.
     
    Cambesa likes this.
  8. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    119
    I'll see if i can extend/override the gravity class then so it ignores certain behaviour when the character is parented to another object. The biggest problem I don't know how to fix yet is how to make the character not influence the rigidbody when standing on it even though physics interaction is turned off. If you could point me in a direction that would really help. If more people request that kind of moving platform behaviour then it's good to add it to the to do list but you probably have enough to do already
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cambesa > I'd recommend asking on the MM Discord, I know some people there (at least one) has done so in the past, maybe you could get help there. As for the rigidbody, I'm not sure what your issue may be, the character doesn't apply force to rigidbodies unless you specify that it should. Looks more like a physics issue than an engine one. If you can provide exact repro steps via the support form I can have a look.
     
  10. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    34
    reuno likes this.
  11. pandemik

    pandemik

    Joined:
    Mar 23, 2017
    Posts:
    11
    thank you, will do!
     
    reuno likes this.
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cambesa > I was gonna add a new item to the todo list with your request, but it turns out it fits within a more generic request for "universal" moving platforms, which has been heavily requested. I'd say there's a chance it'll be in the next update. Drop me an email if you want to test it before it gets released.
     
    Cambesa and Boom_Shaka like this.
  13. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    Hello, I don't know if my question suits here o should be placed with the form but:
    in my scene in cant unpause pressing esc again, it pauses but then escape will not do the unpause.
    The examples included work fine, so it's about my scene: your code is complex and I can't see what I am missing, maybe is it something triggered form the UI?
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    That's handled by the input manager, and the CharacterPause ability, as explained in the documentation.
    These are the only two things you'd need for this to work.
    If that doesn't solve it, don't hesitate to send me more info about your scene via the support form :)
     
    luigi7 likes this.
  15. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    34
    Is there anything we could see the upcoming possible features on 6.5 :)?
     
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    javi_unity402 likes this.
  17. GoranRiddle

    GoranRiddle

    Joined:
    Dec 10, 2015
    Posts:
    4
    Hi. I bought the asset on april 22 but somehow it is still downloading the 5.4 version, as said in the readme. I noticed because I was looking for the CharacterAutoMovement component but it is not included in my downloaded version.

    I am using Unity 2018.4.22.
     
  18. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    The latest version requires Unity 2019.3.3f1 or higher
     
    reuno likes this.
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @GoranRiddle > The asset store just displays the latest version and changelog of any asset, not necessarily the one you'll get.
    As for the documentation, there is no dedicated one for older versions, but the one online still applies, aside from the new features introduced more recently of course.
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @GoranRiddle > These are very unlikely errors (especially because that Unity version change won't get you a different engine version). I can't think of anything that could cause this.
    Please use the support form and provide detailed steps of what you did to update, what version you were on, the steps you took, what version you're on now. Maybe with a bit more context I'll be able to help.
     
  22. KOPEW

    KOPEW

    Joined:
    Jul 30, 2019
    Posts:
    27
    Btw it's still v6.3 at the headline)
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    KOPEW likes this.
  24. _Exerion

    _Exerion

    Joined:
    Dec 3, 2014
    Posts:
    12
    Hello @reuno

    There is a bug in the
    CharacterWallClinging
    ability. The
    RaycastVerticalOffset
    parameter is used only in one place:
    TestForWall()
    and only when facing right.

    It should be used in 4 places instead:
    TestForWall()
    when facing both left and right
    ExitWallClinging()
    when facing both left and right
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @_Exerion > If you think you've found a bug, please use the support form to report it, and provide repro steps to your issue, as well as context info (Unity version, engine version, etc). Thanks!
     
  26. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Hi guys, I am familiarizing with Corgin Engine since a couple of weeks, trying to experiment a bit before starting a small project.
    I have three issues what I am struggling with at the moment, and I was wondering if you could help.

    1) The first one is about how to properly set a landing animation for a jump. I have the jump split into 3 separate animations (jumping, "in the air"-loop and landing). I did setup an animator looking at the tutorials and at the Rectangle animator, but somehow I have a problem with the landing. I see that the HitTheGround boolean is set to true, but it stays so only one frame, and the moment it resets, the Idle animation kicks in, therefore skipping completely the landing animation. (i see that the animators enters for a microsecond the JumpEnd state, but then i goes back to Idle).
    This is my animator, and I am not sure where else i could intervene so to prevent this.

    Screenshot_314.png

    2) The second problem I face is about shooting. My character has no real weapon, but has a shooting animation that spawns a projectile. I did treat it as a weapon, creating an invisible weapon with bullets and all, that causes the character animator to switch to the RangedAttack state.
    The problem is, if the player shoots during the second frame of the animation (it charges up its hands nad shoots), so the bullets shouldn't start right away at click, but wait for 1 frame. I added a 0.1 (then 0.2 seconds) delay to experiment a bit with it. The problem is that with delay, i need to hold the trigger clicked, if i click multiple times, it interrupts the previous action, i see that the first frame of the shooting is played, but it stops there and no projectile is spawned.
    Is there a way to solve this that you might think of?

    3) The third and last, i am not fully sure but it might actually be a bug. It happened to me a few time (in the editor) what while testing my workbench level, the player character dissolved and was respawned at level start as if it had died. I am quite sure it was in full health though. Is it any known bug or might it be caused by something i did set wrong (maybe level bounds or similar?) it's not a very common occurrence, but let's say i had it in 1 every 15-20 runs at least.

    Sorry for the wall of text, and thanks in advance for your time. Corgi's a pretty cool tool, i hope i can get along with it soon!

    Cheers,
    H
     
    Last edited: Jun 2, 2020
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @drHogan > Please use the support form for questions like these, thanks.
    1. As explained in the documentation, using a "any state" pattern is probably not the easiest way to set things up, especially if you're not too comfortable with Unity's animator. Instead, look for more traditional patterns. The RetroCorgi's one is more suited for what you're after. In any case, the reason why your animation doesn't play is probably because it's being interrupted by another one.
    2. Same thing, you probably have an animation interrupting your shoot animation. Not sure I understood the issue correctly though. If it persists, please send exact (written) repro steps from any demo via the support form.
    3. Never seen that before, and it's never been reported either. Again, I'd need exact repro steps to be able to understand what's happening. Edit : maybe your level bounds are wrongly setup indeed. Can't think of anything else that could cause this.
     
    Last edited: Jun 2, 2020
  28. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    It sounds like your animator is working correctly.

    Think about the mechanics of a jump and how you are identifying/defining where your character is in the jump cycle. IE: "HitTheGround" means, by definition, that your character is no longer "jumping"....it's grounded. Therefore, it may not be the parameter to use during a jump cycle.

    Take a look at the parameters again and don't forget that you can use several parameters at once to get your animation exactly right.
     
    reuno likes this.
  29. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Hi, I agree, and I know it's about a single frame hit as i said. Given that i am trying to learn along the guidelines of Corgi, i'd need to find anyway a way to control that animation. Given that landing animation is a quite common animation to give weight to sprites, i was asking if there's a proper way to handle it in the corgi way!

    The animation of Landing, needs to kick in exactly when the jump ends, and that would be perfectly correct for me. I just need to find a way to prevent the idle base state to kick in and interrupt my landing basically.
     
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @drHogan > There's not really a "corgi way" when it comes to animation, as the engine doesn't do animation, Unity does. What you'll want is to make sure your transition doesn't get interrupted, that's what's happening right now. Preventing that will fix your problem :) The NewCorgi3D demo character has one already setup if you need inspiration.
     
  31. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Well yes, when I say the "corgi way" i mean using the way Corgi has this set of animator parameters and inner changes of states. Let's say that I would love to push corgi as far as it can get before i need to modify the code! Will check the NewCorgi3D demo one then, thanks for the tip!

    May ask you @reuno if the second problem I did ask information about is something you have tips about as well? (the shooting with delay)
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @drHogan > There's no need to modify the code to solve your issues, it's purely on the animator side :)
    As for your second question, as I said, either it's also an animator issue, or I didn't get the problem. Please provide more info via the support form, as well as repro steps, and I'll be happy to have a look.
     
  33. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    thanks Reuno, I will upload the test project with the steps tomorrow morning and send you the link via support form!
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @drHogan > No need to upload anything, simple repro steps from a fresh install, in any of the demos will do just fine, thanks!
     
  35. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    I think it's probably easier to show it on my project though as it's related to this shooting setup that I couldn't find in the demos
     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @drHogan > It'd be much easier if you could just provide repro steps from a fresh install, thank you.
    That helps pinpoint the problem. You'll find plenty of projectile weapons throughout the demos, and you can add delay to any of them. You'll also be able to define interruption rules on all of them, so that shouldn't be a problem :)
     
  37. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    ok, will do then! i am not 100% sure if it works mostly because my character has no real weapon (it's invisible) and the shooting is done through a character animation, but will try!
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @drHogan > If that helps you can disable the sprite renderer on any of the demo weapons, and you'll get an invisible weapon :) Let's start like that and hopefully I'll be able to solve your issue quickly!
     
  39. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Will do, thanks and see you tomorrow!
     
  40. KOPEW

    KOPEW

    Joined:
    Jul 30, 2019
    Posts:
    27
    Btw I have the same problem and I was asked here before)
    I'm using RetroCorgi animator as a reference but still have problems with pre-jump (when character crouch for a moment to charge push) and landing, exactly what drHogan asks. I tried different transition settings, different transitions as such, but it never lands correctly
    And when I'm just running left and right character can "fall" for a moment, I mean at the edges or angles of terrain he falls and plays falling animation like for 0.2sec. I have semi-smooth terrain, like ~~ hills or something) And characters can't walk on it properly
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cunny-Lang > Regarding landing, likewise, I'd recommend looking at the NewCorgi3D demo character, it's got a landing animation. I don't believe you should copy its animator, or any demo animator, each character in each game is unique and ideally requires its own custom animator, if you want to get good and pleasing results, but you can probably take inspiration from it.
    Your other issues (pre jump and that edges thing) seem completely unrelated :
    - pre jump would require extending the jump ability to add a delay before the actual jump. I encourage you to use the support form to request it if you'd prefer I add it.
    - the second one I'm not sure I understand. The engine comes with stick to slopes features, you might want to look at the examples to see how it's done in various contexts. If the issue persists, don't hesitate to use the support form and provide repro steps for it.
     
  42. KOPEW

    KOPEW

    Joined:
    Jul 30, 2019
    Posts:
    27
    Yeah, second issue was solved by different slope settings in Corgi Char component, thank you)
     
    reuno likes this.
  43. andrin2020

    andrin2020

    Joined:
    Mar 9, 2014
    Posts:
    29
    How does the CinemachineCameraController get a reference to the player? There is no way to set it in the inspector as it is set to read only and I can not track it down in the code. I have set up the cameras but when I play the scene the camera does not find the player.
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @andrin_man > As explained in the documentation (or the class itself), that's done via its SetTarget method, which gets called on certain events (in your case, that'd be a SetTargetCharacter CameraEvent).
     
  45. andrin2020

    andrin2020

    Joined:
    Mar 9, 2014
    Posts:
    29
    @reuno. Yes I have found the line of code in the LevelManager script that calls the MMCarmeraEvent to SetCtargetCharacter but that line fo code does not seem to execute. If found that if I put a debug.log in prior to MMGameEvent.Trigger("Load") it will write to the console but if I place it immediately after that line and before the MMCameraEvent.Trigger section it does not. Is there something I am missing here? If I set up debug.logs in the CInemachineCameraController where these event are handled it does not appear to be hearing them.
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @andrin_man > I don't know, it seems to work with a fresh install of the engine on my side, and it's never been reported before, so maybe you've changed something, but I can't really guess what without more details. If the issue persists, please send me repro steps via the support form, I'll be happy to have a look.
     
  47. andrin2020

    andrin2020

    Joined:
    Mar 9, 2014
    Posts:
    29
    @reuno > As a test I commented out the MMGameEvent.Trigger("Load"); line of code in the LevelManager and it all works as expected. I suspect this will lead to unwanted downstream consequences but it worked for now.
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @andrin_man > That's probably not a good idea down the line, indeed. As I said, if you could just send me more info about what you may have changed, I could tell you more about your issue.
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @andrin_man > Please provide the info requested right next to the form, and your email, I can't reply to you if you write that in the email field :
    upload_2020-6-4_14-4-50.png
    :)
     
  50. andrin2020

    andrin2020

    Joined:
    Mar 9, 2014
    Posts:
    29
    Just caught that. Sent you another message through support with my email. Doh!
     
    reuno likes this.