Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v7.0 : procedural gen, sound mgmt...]

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

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @Creotronic > "Only dash left or right" is CharacterDash's default behaviour. In its aim section, make sure AimControl is set to Off. As for walljumping, you can make wallclinging input independent (it's a checkbox).
     
    Creotronic likes this.
  2. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    12
    Hey you two, wanted to say thanks for helping a noob out. Using the feedback system in conjunction with the inventory system I've made a solid minion system! Corgi truly is incredible.

    The only real issue is ai patrol automatically heads towards the left. Might have to manipulate it in code or just make the minion walk forward indefinitely. Nothing too troublesome. The core gameplay loop is really coming together on my prototype and it plays fun as hell! Thanks!
     
    reuno likes this.
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @NonhumanStoltz > That's great, don't hesitate to share it with me when it's ready!
     
  4. Creotronic

    Creotronic

    Joined:
    Oct 31, 2020
    Posts:
    9
    @reuno > Thanks for the fast response! The dash setting was exactly what I was looking for, I was just not expecting the player could still control left / right from the description of it. Works like a charm now.

    As for the wallclinge / walljump, I prefer to require a button input for the clinge, so that the player can also cancel it by not pressing against the wall anymore. I'm looking for a way to have the player jump up the wall by pressing against the wall and jumping (which works) and have the player also be able to jump away from the wall (like, a "proper" walljump) by pressing away from the wall and jumping. The latter does not seem to work as it cancels the jump (or at least, that's what it looks like). There seems to be a custom coded solution to this described here: https://forum.unity.com/threads/rel...t-recoil-hitscan.286289/page-142#post-6387060
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @Creotronic > I'm glad it's working now, thanks for letting me know.
     
  6. ScotianWolf

    ScotianWolf

    Joined:
    Feb 3, 2021
    Posts:
    9
    I have just released a pre-demo for my upcoming game The Scotian Fox.

    One thing I can't seem to find out and it wasn't even something that I noticed until I Seen other's playing my game on YouTube. But for the Game-Over screen is there a way I can make the mouse visible? It seems that many are having to completely restart the game because they are unable to click the retry button .

    The Scotian Fox : Early Demo by ScotianWolf (itch.io)
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
  8. FeboGamedeveloper

    FeboGamedeveloper

    Joined:
    Feb 2, 2014
    Posts:
    45
    Hi, I would like my character when it sticks to a moving wall, it stays attached (like it is on a moving platform). How can I do?
     
  9. LGHTHD

    LGHTHD

    Joined:
    Jul 12, 2019
    Posts:
    2
    I'm having the exact same issue (a few years later).

    Renault, I already shot you a support email about this but maybe F1GHTOFFYRDMNS or someone else in the community can help me out too.

    Unity version 2020.1.3
    Corgi version 6.5
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @Amalfi-Prozen > that's not a feature of the engine at the moment, you'd have to implement it.
    @LGHTHD > I believe I answered your email already, if not, my answer to that initial question 2 years ago still stands :)
     
  11. ScotianWolf

    ScotianWolf

    Joined:
    Feb 3, 2021
    Posts:
    9
    Is there a way to flip the wall-slide?
    I looked through the script but couldn't seem to find it, but I am trying to make it so that my character faces the opposite direction as it doesn't look good in-game for him to be sliding the way that he currently is.

    Thanks! :)
     

    Attached Files:

    • 1.png
      1.png
      File size:
      1.6 MB
      Views:
      32
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
  13. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    12
    How compatible is the infinite runner engine with the corgi engine? Since feedbacks and inventory engine works with corgi, does infinite runner compliment the same way? Can it be isolated to just specific scenes, i.e. character goes to a door in a corgi engine scene and then loads a scene in the infinite runner engine? For some reason I feel like this is a crossing the streams from ghostbusters kind of idea.
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @NonhumanStoltz > No, they're two completely different systems, with nothing in common. They're not compatible. You could have a project where you go from a scene powered by the Corgi Engine to one that has nothing to do with it and powered by IRE of course. I'd recommend checking the FAQ for more details on this.
     
    NonhumanStoltz likes this.
  15. ScotianWolf

    ScotianWolf

    Joined:
    Feb 3, 2021
    Posts:
    9
    Is there a way to adjust where the bullet shoots from ? For example, using your " Blue Robot " . If I wanted to re-position where the bullet shoots from is there a way to adjust it? Thanks
     
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @ScotianWolf yes, as explained in the documentation that's something you can set in the projectile spawn section of your projectile weapon's inspector :
    upload_2021-3-26_21-16-50.png
     
  17. TheFoxWolf

    TheFoxWolf

    Joined:
    Mar 28, 2021
    Posts:
    3
    I am currently using the Retro Adventures Controller prefab and I have made slight changes.

    The changes that I have made was changing the Animator on the Retro-Character prefab (And used the one from Corgi 2D) . Everything is working flawlessly except for the shooting.. Any idea on how I would go about making it so that if the Character jumps, he can't shoot as I would like to have my character being only able to shoot if he is on the ground?
     

    Attached Files:

  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
  19. TheFoxWolf

    TheFoxWolf

    Joined:
    Mar 28, 2021
    Posts:
    3
    I can't seem to find the functions for Attack / Shoot. Am I looking at the right method?
    thanks
     

    Attached Files:

  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @TheFoxWolf > Select the CharacterHandleWeapon ability, and set Jumping as a blocking movement state for it.
     
  21. muslearningmagic

    muslearningmagic

    Joined:
    Nov 29, 2020
    Posts:
    3
    Hi Reuno. Really great asset. Has saved me loads of time and is simply awesome :) Had a couple of questions please that I was hoping you could help with. FYI - i'm a total noob and this is my first post ever so apologies in advance if any of the below is dumb. I tried doing a search on this thread but couldn't find answers for the below.

    1. I see from the documentation the Corgi engine works with hand-weapon (i.e. character hand follows grip transforms on the weapon) IKs for 3D avatars. Does it also work for Unity's 2D animation package for 2d rigs? The problem i'm having is that I can set up IK and it works great when the weapon is part of the player's object hierarchy but as the Corgi engine has the weapon as a separate prefab and swaps it in and out of the player's hierarchy as and when it is equipped, Unity's 2D animation IK removes the reference to the IK targets (weapon's grip transforms) and the IK won't work. I've tried looking into Unity's documentation to see how the IK target can be changed in runtime via script but unfortunately it is currently beyond my noob coding skills. If there is some setting or workaround i've missed here that would make it work, your advice would be greatly appreciated. Otherwise it would be fantastic if Corgi engine weapon integration with the unity 2D animation package IK functionality can be added at some point in the future please.

    2. I've noticed in the features weapon demo scene, if you pick up the same item quickly (like bullets, each pick up with 25 bullets), it will show the total of bullets as one inventory item (e.g. 100 bullets). However, if there is a delay in picking up the next bullets item, it then gets added as a separate inventory item (e.g. so now I have one bullets inventory item with 100 bullets and another inventory item with 25 bullets). Is there a setting please that aggregates the bullets into one inventory item always irrespective of the item pick up time delay or would this have to be added in the code?

    Many thanks
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @muslearningmagic > 1. The only example right now is with 3D IK, but you could implement 2D IK on the same principles. I haven't done such an example yet because the 2D IK in Unity is still relatively new, the API keeps changing, and most people still don't use it in production for these reasons. But it'd be the exact same logic as the 3D one, and you can look at how it's done for reference.

    2. I'm not aware of that "pickup speed issue", and couldn't reproduce it either (no matter how fast I pick them up, I always end up with a pile of 100 and another of 50). There's nothing in the code that "waits" in any way, it's all instant really, so I'm not sure what the issue may be here, and unless you're picking multiple pickers at the exact same frame, I can't think of anything that could produce this outcome. If the issue persists, please use the support form and provide exact repro steps, I'll be happy to investigate this.
     
  23. muslearningmagic

    muslearningmagic

    Joined:
    Nov 29, 2020
    Posts:
    3
    Many thanks for the prompt response.
    1. Thanks for the pointer, i'll look into it.
    2. I checked again and realized my assumption was incorrect. It was not time related but actually the settings in the minimal demo that gave a max value of 100 for bullets. Therefore once the bullet count hits 100, the next bullet pick up will occupy a new inventory slot and start the count again till it reaches 100. Considering this new realization, can I politely change the question please. Is there an option that turns off this behavior (i.e. no more bullets can be picked up once the 100 is reached and therefore no new inventory slots taken up for bullets beyond the first 100)?

    Thanks again :)
     
  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @muslearningmagic > No, there is no such limit at the moment, you'd have to implement it.
     
  25. muslearningmagic

    muslearningmagic

    Joined:
    Nov 29, 2020
    Posts:
    3
    Understood and thanks again for the prompt response
     
    reuno likes this.
  26. TheFoxWolf

    TheFoxWolf

    Joined:
    Mar 28, 2021
    Posts:
    3
    Is there a way to get both the Hearts (From the Retro Adventures) as well health UI from the 2D demo to work at the same time. It seems that when I try and add a health bar , it'll display the health bar only and not the stars. Hope that makes sense
     

    Attached Files:

    • 12.jpg
      12.jpg
      File size:
      67 KB
      Views:
      26
    • 14141.jpg
      14141.jpg
      File size:
      177.9 KB
      Views:
      29
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @TheFoxWolf > There's no example of that (it's not a very common use case), but feel free to implement it, of course.
     
  28. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    12
    Is there a way to have a gameobject appear only if you have certain items in the characters inventory? I don't mean keys, but like making it where the "next level" game object would only appear if character as X items. I tried to use the conditional event MMtool but I guess it doesn't consider item picking as "destroyed" or "disabled." Course I could just make the picker have a key item in it to, which is fine, but curious if there's a streamlined approach I'm not seeing.

    Which, speaking of the MMtools, is there a tutorial vid on them? I couldn't find anything other than documentation and usually I'm able to figure it out what each MMtool does through trial and error and cross referencing with unity.
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @NonhumanStoltz > You'd need to have a class that checks whether or not that item you're after is in the inventory or not. I'd recommend using the Inventory API to do that, it's a one line check.

    And no, there's no video tutorial on MMTools, it's a ton of helper classes, and they're all commented and documented, but I'm not sure what a dedicated video would look like, they're just helpers and tools, and there's a lot of them :)
     
  30. poliman

    poliman

    Joined:
    Feb 5, 2015
    Posts:
    23
    Hi,

    Has anyone come across a problem using Unity 2D bones and making a player from it.

    To recreate just take demo scene lava and replace Player Spine-space-cat (in prefab ModelContainer) with anything that has even one bone made with Unity skinning. It doesn't have to have an animator, pure object made of psb file with one bone.

    The performance on WebGL drops from 100 to 10 frames.

    I you delete the bone and make an object out of psb file it runs smooth, so i guess it has to be connected with bones functionality

    Are Unity 2D bones not compatible with Corgi build to WebGL?
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @poliman > Unfortunately in all my tests (unrelated to the engine), I found 2D bones performance to not be production ready yet. That said there's no dependency at all between both, and no link I can think of that would cause bones to perform worse with or without the engine. The engine simply isn't "aware" of bones, it doesn't interact with them at all, so I don't think it's related. Have you tried profiling your game to see what causes this? What's performance of that same bone structure without putting it on a corgi controller?
     
  32. poliman

    poliman

    Joined:
    Feb 5, 2015
    Posts:
    23
    Hi thx for mega fast answer.

    The character has:
    - 6 body parts (every part has Sprite skin script on it),
    - one bone.

    WebGL profiler shows:
    1. When disable all 6 Sprite Skin scripts, fps is ok
    2. When enable 1 Sprite Skin script: https://ibb.co/MkNwGCQ
    3. When enable 6 Sprite Skin script: https://ibb.co/3vd3j8T

    Important: the peak is when you move the Player, when it not moves the fps is as normal

    As you see on pics SpriteSkin.LateUpdate() is the problem.

    I tried on Lava scene and also HisterLevel

    Unity 2020.3.2f1, Windows 10

    If you want I can send you prefab of player that i use, or send you whole project, but it is just clean Corgi package with this one thing added.
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @poliman > Again, have you tried measuring the performance of that same bone structure without putting it on a corgi controller, and have it move using a class of your own?
     
  34. poliman

    poliman

    Joined:
    Feb 5, 2015
    Posts:
    23
    The problem is not connected with Corgi. I made a clean project with it and there is the same problem. Sorry will go thru it, maybe another Unity BUG ...
     
    reuno likes this.
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @poliman > Yes, unfortunately, it's indeed a Unity bug in this case. I'd recommend reporting it.
     
  36. poliman

    poliman

    Joined:
    Feb 5, 2015
    Posts:
    23
    For anyone interested in WebGL:
    Issue is just poor Unity 2D skinning/bones system performance on WebGL.
    https://forum.unity.com/threads/2d-animation-is-out-of-preview-for-2019-3.818724/page-5#post-6763879
    Everyone has these issues. So as @reuno said, this system is not ready. I had lots of issues with it in standalone games, but WebGL is horrible performance with one character and few vertices ...

    I used Creature skeletons > Unity but it also has issues with shaders.
    https://www.kestrelmoon.com/creature/index.html
    BTW Creature interface is a nightmare, but has some features for a beginner.

    Finally switched to Spine with all my builds, interface is great, workflow is better than others, and it works in WebGL flawlessly.

    But if I can ask @reuno:
    You say in https://corgi-engine-docs.moremountains.com/animations.html > "Spine" section
    "The “best” way ... Select the SkeletonMecanim"

    1. From Spine point of view http://esotericsoftware.com/spine-unity the best option is SkeletonAnimation.
    Did you manage to have a neat way to integrate their SkeletonAnimation to work with Corgi scripts like you have based it on Mecanim parameters?
    2. If nethertheless we use SkeletonMecanim (As i did for now, coz there is only one issue) pls mention one thing in your docs, (from Spine docs):
    "Compared to the SkeletonAnimation component, SkeletonMecanim requires additional timeline keys at the first frame of an animation if it shall smoothly mix out the timeline state of a preceding animation. See http://esotericsoftware.com/spine-unity > section Required Additional Keys for more information.”

    Again thx for help Corgi is really great piece of software ;)
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @poliman > Thanks for sharing that info.
    1. No, there's no built-in support for proprietary animation systems, that's something you'll have to implement.
    2. I can't possibly add spine doc to the engine, that info belongs on Spine's end, not the engine's, it's basic Spine knowledge.
     
  38. GooseLongCat

    GooseLongCat

    Joined:
    Jan 29, 2021
    Posts:
    4
    @reuno I started to develop my own Metroidvania game 2 months ago, and the Corgi engine has been extremely helpful! Thank you so much for this great piece of software! I have a quick question: I am experimenting with MovingOneWayPlatforms and noticed that the player is 'teleporting' on top of the platform when: jumping from below and close enough to the top of the platform (but feet still below the top of the platform). Tuning the platform box collider 2d to be thinner, and the player controller's raycast offset to be shorter doesn't change much. Is there a way to reduce the 'teleport' distance so that it is less noticeable? Merci d'avance pour ton aide!
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @GooseLongCat > MovingOneWayPlatforms should have an edge collider, not a box collider.
     
  40. GooseLongCat

    GooseLongCat

    Joined:
    Jan 29, 2021
    Posts:
    4
    Thank you so much for the fast reply! I was using a box collider because this was the default collider for the MovingOneWayPlatforms on the FeaturesPlatforms Minimal Scene. I just replaced with an edge collider aligned with the top of the sprite, but I am still noticing this small 'teleporting' on top of the platform. Is there a way to reduce the tolerance for it, so that the controller has to be closer to the top to land on the platform? This is a minor detail, but I was still wondering if we can tune this.
     
  41. GooseLongCat

    GooseLongCat

    Joined:
    Jan 29, 2021
    Posts:
    4
    @reuno this seems to happen when _controller.speed.y < 0 and the bottom of the player's box collider is below but within 0.5 vertically of the edge collider of the MovingOneWayPlatform.
     
  42. GooseLongCat

    GooseLongCat

    Joined:
    Jan 29, 2021
    Posts:
    4
    @reuno I could find the issue! In CorgiController.cs, there's the CastRaysBelow() function, and within it checks collisions against OneWayPlatformMask and MovingOneWayPlatformMask: "if the character is jumping onto a (1-way) platform but not high enough, we do nothing", lines 1060-1067:
    • !State.WasGroundedLastFrame
    • smallestDistance < _boundsHeight / 2
    • OneWayPlatformMask.MMContrains(StandingOn.layer)
    • MovingOneWayPlatformMask.MMContrains(StandingOn.layer) && (_speed.y > 0)
    If above conditions are satisfied, we do nothing, otherwise we snap the player to the platform.

    However, when _speed.y <= 0 we'll snap to the MovingOneWayPlatform anyways since the condition won't be satisfied. Removing the extra _speed.y > 0 condition fixed the issue for me.
     
    Fed81 likes this.
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @GooseLongCat > That's by design, but if you prefer changing that, go ahead.
    Next time please use the support form, it'll be faster than spamming the forum :)
     
    GooseLongCat likes this.
  44. cficara

    cficara

    Joined:
    Sep 27, 2017
    Posts:
    16
    Hi! I updated unity to 2020.3 LTS and noticed MMInformation not only is missing from inspector, but is also hiding the next property below. Here's a screen:



    This affects the whole project. Any idea what's going on? Thanks.
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @cficara > Yes, yet another 2020.x bug. I'd recommend sticking to 2019.4.x for now, releases after that are unfortunately packed with issues.
     
  46. damiensenechal28

    damiensenechal28

    Joined:
    May 5, 2020
    Posts:
    1
    Hello!
    I'm using the CharacterAutoMovement Ability to force my character to walk when entering a trigger and I want it to stop when exiting this same trigger but I cant find any ways to stop the AutoMovement even by disable the CharacterAutoMovement Script.
    Is someone having a solution to stop my character from automoving and go back into the input mode when I can control my character back ?
    Thank and good evening !
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @damiensenechal28 > The CharacterAutoMovement ability's got a SetDrivenInput method you can use to set its auto input to anything you want (0 would stop it).
     
  48. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    21
    Hello. I have a question.

    What should I do if I want to lock the character operation to create a conversation scene etc.?

    Also, are there any reference codes or settings in the assets?
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
    @mk7gwc > If by "lock the character operation" you mean disable input, that can be done easily, either at the character/ability level if you want granularity, or at the InputManager level, setting InputDetectionActive to false.
    I don't know what you mean by "reference codes or settings" in that context though, so I can't really comment on that part. I hope it'll answer your question!
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,208
unityunity