Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v7.4 : better inventory]

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

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
  2. bl4ckfr05t

    bl4ckfr05t

    Joined:
    May 13, 2017
    Posts:
    4
    I'll try this workaround. Ideally it would be nice if the joystick stopped when we disable input from the InputManager.
     
    reuno likes this.
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    Good news everyone, I've just pushed v7.5 of the Corgi Engine to the Asset Store.

    Full release notes :
    - Adds the Self Destruct AIAction, letting you kill an AI easily
    - Adds an option to set separate ray offsets for vertical and horizontal rays on the CorgiController
    - Character now exposes a Health slot (auto filled), letting you separate Health to a different node if you want to
    - AI Actions and Decisions are now initiliazed by the AIBrain
    - AIAction:Initialization is now public (changed from protected)
    - Updates instance checks for all singletons to a safer method
    - Initiating a dash now automatically cancels any slow fall that may be in progress
    - CharacterAbility:RegisterAnimatorParameter is now public
    - Adds extra resets to Health init to avoid it being stuck in post damage invulnerability
    - Fixes a bug that could cause the character to be allowed to move horizontally when diving into a grip element
    - Fixes a bug that would prevent audiosources played by the MMSoundManager to recycle correctly
    - Updates MMTools and MMFeedbacks to their latest versions
     
  4. EarlyDarkEntertainment

    EarlyDarkEntertainment

    Joined:
    Oct 8, 2018
    Posts:
    6
    Hello thanks for the updates. 7 year anniversary
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
  6. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    Hi. I was using the ladder. I added boxcoll to the ladder and gave it a One platform, but when my avatar moved to the bottom of the ladder, it jumped directly onto the One platform. I don't need to press W. Is something wrong with me?
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @jqxyx > I don't know if there's something wrong with you. But please use the support form for support questions, as I've reminded you to do repeatedly now, thanks.
     
  8. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    I don't get it. '
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @jqxyx > Click here, fill the form, provide the requested information, press the Send button.
     
  10. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    6
    I need help.The Weapon Aim Control(use mouse) function dont work on the scene i created.I set the character i made to the “Corgi3DxTheHunt” it works okay. I tried drag prefabs from other demo to my scene.But it still not work.I dont understand why this happened.I used Unity Pixel Perfect Camera and Cinemachine togerther.Maybe this caused some problem??:confused: QQ截图20211222183359.jpg QQ截图20211222182853.jpg
     
  11. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    6
    Oh I figure it out.:)Looks like Cinemachine cant work with Weapon Aim Control(mouse free).
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @wechat_os_Qy0z_aF7Nfhquhava38GLxUWU > Yes, you can absolutely use Cinemachine with mouse control. You can see an example of that in action in the FeaturesWeapons demo scene. As for your issue, I don't know what could cause this, an incorrect scene setup I suppose, no main camera based on that error you mention.
    If your issue persists, please use the support form and provide more info about your scene and how you built it.
     
  13. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    6
    SIR PELASE DO IT! I really need this!
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @wechat_os_Qy0z_aF7Nfhquhava38GLxUWU > As mentioned in that post you're quoting, please use the support form to make feature requests. And again, that's already a native feature in Unity, you can already do it, like you would in any project, there's nothing specific to the engine here. Check Unity's documentation about it to learn more about how that package works.
     
  15. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    6
    Sir thanks for quickly respond.Now i understand why you make custom weapon parameter name.I made some character animation can rotate with weapons angles and it works!Me Catman as an artist think you are genius!
     
    reuno likes this.
  16. bl4ckfr05t

    bl4ckfr05t

    Joined:
    May 13, 2017
    Posts:
    4
    Hi, how to switch rooms when I'm going from one room to another without the Teleporter or GoToLevelEntryPoint?
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @bl4ckfr05t > I'm not sure what you mean, these are the two ways to go from one room to another. You can create new classes if you want to, targeting the same APIs these two do, or extend the system. If you have more questions, please use the support form, thanks!
     
    bl4ckfr05t likes this.
  18. Pvt_Hudson

    Pvt_Hudson

    Joined:
    Jan 20, 2016
    Posts:
    38
    Hello, i am trying to substitute a human character in the new 3d demo scene.
    Is it possible to have the weapon (e.g. pistol) follow both the position AND rotation of the weapon attachment ?

    I am using Weapon Aim with Mouse aim control and Free rotation mode, with limited aim angle (+/- 20).

    When the character looks up (and arms also face up as part of the animation), the gun is still facing horizontal which looks very odd. Whilst I could widen the min/max angles, the player can rotate the gun at unrealistic angles.

    So what i am trying to achieve is... the gun moves based on the "weapon attachment" position and rotation, and the player can then influence the aiming within a limited range based on where the character is facing/aiming.
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @Pvt_Hudson > The best way to do that natively would be to widen your aim angles. Alternatively, you can extend the WeaponAim class to implement your own specific rules and have it be a mix of attachment rotation and some input influence.
     
  20. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    6
    I dont know whats looks like in your scene.In my situation I use anima2d and character animation to relative Pistol's angle(I dont know how to programing.I dont have any choice:( ).So far it likes fine at aim.A small problem for me is pistol keep rotation with mouse direction when the character play reloading animation.It depending on the art style and final visual effect you use:)
     
  21. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    6
    Hi reuno Please show me the way
    At PixelRouge demo.The Adventure can change appearance when armor equiped.
    I want CharacterInventory ability can equip armor or helemt.When the armor equiped then character can replace skins.The Corgi Engine only support weapon and hotbars.What should i do?
     

    Attached Files:

  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
  23. Pancakz

    Pancakz

    Joined:
    Sep 24, 2021
    Posts:
    4
    Hello, I just started using Corgi Engine and so far I love it.
    I'm trying to find the best way to use a cat sprite in a 2D platform level. The issue I have is that it seems the engine only supports box colliders for players, am I right ? While that works fine for simple standing characters, I'm finding it difficult to handle a cat sprite correctly.

    If I put the box collider on the body, the cat's face goes through walls
    If I extend the collider to cover the body and the face, it means my cat can land on a platform even though its body is not touching the ground and it looks like it's floating (picture attached).

    Does Corgi (or Unity) has anything that can help me dealing with this ?
     

    Attached Files:

  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @Pancakz > No, the engine only works with box colliders, like most platformers do.
    I'd recommend adjusting your collider's width to have it only cover the body, and then deal with rendering issues (like a cat's face going through walls) at the rendering level. Typically a sorting layer tweak will solve this.
     
  25. Pancakz

    Pancakz

    Joined:
    Sep 24, 2021
    Posts:
    4
    Alright, thank you for the advise !
     
    reuno likes this.
  26. otphj_llc

    otphj_llc

    Joined:
    Feb 15, 2021
    Posts:
    3
    Hey I'm having a bit of a problem with the combo weapon playing my full animations. In the gif you can see the animations playing out how I want them in order, then you can see how it looks in game. The animations come out truncated for some reason. I've tried messing with the "Time Between Uses" and the "Active Duration" parameters but they don't seem to do much. Any help would be appreciated!
     

    Attached Files:

  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @otphj_llc > As explained in the documentation (https://corgi-engine-docs.moremountains.com/animations.html#debugging-animations), if your animations are "truncated", then it's likely because another transition is interrupting them. Making sure your transitions are setup correctly will fix the problem. How to do that depends on your animator, there's no universal setting for this, but checking your exit times and points of entry into animations would be a good start.
    You can learn more about Unity's animator at https://learn.unity.com/tutorial/controlling-animation or https://www.gamedeveloper.com/design/unlocking-unity-animator-s-interruption-full-power
     
  28. otphj_llc

    otphj_llc

    Joined:
    Feb 15, 2021
    Posts:
    3
    Thanks @reuno ! One last question, is there a parry/blocking ability, and if not how would you go about starting to create one? Cheers!
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @otphj_llc > No, there isn't. You can see a full list of abilities in the documentation. As for how to create one, that'd be a new system, and how to implement that would depend on your exact specs, there are tons of different ways to go about it.
     
  30. ViBrentStudios

    ViBrentStudios

    Joined:
    May 3, 2021
    Posts:
    1
    Did you ever find the solution to this? All my key operated doors stopped responding same as you had here..
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @ViBrentStudios > Make sure your item's asset file name matches your ItemID.
     
  32. Cosmobeard

    Cosmobeard

    Joined:
    Jan 7, 2022
    Posts:
    1
    Hello Reuno,
    I bought Corgi and TopDown engine recently and I've been having strange issues with the character movement. I'm on a Macbook Pro M1Max Apple Silicon with Mac OS 12.1. Unity editors are freshly downloaded, nothing changed in project settings or Preferences, and are versions LTS 2020.3.25f1 (Intel running Rosetta II) and beta 2021.2.7f1 for Native Apple Silicon.

    I imported the assets like normal, everything is fine, no errors.
    When I play any of the demo scenes for both Corgi and TopDown, the character movement acts strange; If I continually tap and release the A (left) or D (right) keys (or W and D for TopDown) they will move a bit in their direction, then move farther like I held down the key, and lastly it will keep moving the character even if I have stopped pressing the movement input key. Additionally, using spacebar to jump occasionally doesn't work or there's a delay of about 2 seconds. Is this an issue because of Apple Silicon?

    I tested both plugins on my Windows 11 PC running LTS 2020.3.25f1 and the beta 2021.2.7 - they had no issues. The character controller worked perfectly with keyboard input.

    I've uninstalled/re-installed Unity a handful of times. I've tried using bluetooth keyboards and wired keyboards. I read that it could be an issue with Unity's Input Manager but everything looked fine, and again, I did not alter any settings.

    Any ideas would be awesome. Bonne année!
     
  33. Pancakz

    Pancakz

    Joined:
    Sep 24, 2021
    Posts:
    4
    Hello @reuno, I've encountered a weird problem where my character would randomly go flying for no reason.
    I attached a gif to show the problem. All I'm doing is pushing a Pushable object with a basic Box Collider 2D. In this example, my level bound is not very high, but if I increase it my character goes way higher.

    It doesn't always happen, but it happens fairly often. If you have any idea what could be causing this issue and how I could solve it, I would be very grateful !
     

    Attached Files:

  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @Cosmobeard > I unfortunately don't have a M1Max macbook to test with. The closest I have is a M1 Air, where it works fine, no input issue. If it works there, if it works on your PC, then I'd say it's starting to look a lot like a hardware issue, but I have to admit I don't know what it could be, nobody's reported such a thing so far. I'll try to see if some of my users have such a device.
    @Pancakz > It doesn't seem like it's flying for no reason, it's flying because it's being pushed by a rigidbody powered pushable object. As explained in the documentation, the engine isn't physics based (it's the whole point), and physics interactions are experimental at best. In this case locking rotation for that vase would likely improve things, or you could use the CorgiController push ability instead, but physics will always lead to that kind of glitches, hence the non physics design of the engine.
     
  35. OldRoutes

    OldRoutes

    Joined:
    Aug 1, 2013
    Posts:
    5
    Hey!

    The Corgi engine looks great!

    I was planning on working on a 2d game that features digging mechanics, similar to Yoshi's Island or even Ori and the Will of the Wisps (digging a whole through sprites).

    Is this built-in in the engine, and if not do you have any ideas how to achieve such a feature with Corgi?
     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @OldRoutes > no, there is no such feature. As for how to implement it, it's too big a feature to answer in a forum thread, and it depends too much on your exact specs. But that'd be pretty much unrelated to the engine, so any approach would do.
     
  37. Fed81

    Fed81

    Joined:
    May 22, 2020
    Posts:
    4
    Hi, Reuno! I have actually the same kind of a problem. It is very important to keep things realistic in this situation.
    I just wonder if it is possible to make some restrictions (by scripts or some other options may be..) for the Character to make it "not to fly(jump) higher than Y" when other rigidbodies force it to fly(jump)?
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @Fed81 > As explained above, this is a non physics engine, it's not designed for physics interactions, quite the opposite. It's designed for tight gameplay. The solution I'd recommend in this particular case is to not use glitchy physics, but stick to the engine's features, such as the dedicated corgi controller push ability. But you can also try to fight physics and add restrictions like you describe, it may work in your use case.
     
    Fed81 likes this.
  39. Pancakz

    Pancakz

    Joined:
    Sep 24, 2021
    Posts:
    4
    I managed to fix my issue simply by adding more raycasts on the Corgi Controller component of my character. It was set to 4 and I increased both vertical and horizontal rays to 8, and no more flying to outer space!
     
    reuno likes this.
  40. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    62
    Hello everyone I am just looking for some friendly advice about source control with Corgi Engine. I just started using Unity Collaborate and was wondering if I should ignore the CorgiEngine folder (its quite large) since I could just reimport it if I ever needed to and just keep track of my own scripts and assets with the source control? Or is that a really bad idea?
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    brittany likes this.
  42. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    62
    Thank you very much for the advice Reuno! I will take a look at those options.
     
    reuno likes this.
  43. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    62
    Hello everyone; I am looking for some ideas on how to implement something into Corgi Engine. When my character moves left and right, and is not shooting, it needs to flip to the correct direction, which was easy to do. However, for shooting I will use two buttons. One for shooting left and one for shooting right. So, for example, the character may be moving left, but facing and shooting right. If it is moving left and not shooting, it faces left, but if as I am still moving I then press to shoot right, it needs to keep moving left but flip to the right and shoot right. Then as I still keep moving left I stop shooting, it would flip back and face the left again.

    If I were coding it from scratch I would know how to do it, but I want to implement it as properly and in the spirit of Corgi Engine as I can. I see some features that I think may be what I am looking for but I haven't figured it out yet. For example, in Character Handle Weapon, there is the option "Face Weapon Direction", and in Projectile Weapon, under Position, there is "Flip Weapon On Character Flip". I selected Face Weapon Direction, and unselected Flip Weapon On Character Flip but this is not enough, the weapon shooting still changes direction with the movement and so does the character.

    Is this doable in the engine as is or do I need to extend, hmm probably the Character Handle Weapon class to add this functionality?
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @brittany > You could do it like it's done for the AIs, the WeaponAim component has a Script mode that lets you feed it any direction you want.
     
    brittany likes this.
  45. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    62
    Nice! Well, I almost have it working. I am using the SetCurrentAim method on my WeaponAim, like this (_weaponAim.SetCurrentAim(Vector3.right) (or left) for example. The problem is that it doesn't immediately switch between right and left, it is gradually rotating toward the right or left. How can I make it instantly switch? I have it set on Strict 4 Directions, but I think since I have the aim control set to Script and am changing the aim directly in the code that it is overriding that.
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @brittany > You can tweak weapon rotation speed on that same component, or set it to rotate instantly.
     
    brittany likes this.
  47. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    62
    Thank you so much Reuno!! I actually even saw that on there but didn't think to set it to 0. I thought that would make it not rotate at all. Thanks again!!!!
     
    reuno likes this.
  48. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    Hello, I have a question.
    The Corgi engine consumes a lot of Layers by default, but when I want to combine other assets that utilize Layers, there is not enough free space in the Layers.
    Is there any Layers that I can exclude from the CorgiEngine? Is there any other way to solve this problem?
    As an example, the Parallax effect of the asset procamera 2D uses Layers to specify the depth. There are not enough unused Layers, so it can only represent about 3 layers of depth.
    I would like to use another asset because the Parallax effect in CorgiEngine does not work as well as I would like.
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,450
    @mk7gwc > Sure, you can remove any of the layers you don't plan on using. For example if you don't use moving platforms, you can remove/reuse the MovingPlatforms layer. None of them are mandatory, and can be renamed/moved/replaced. All that matters is that your scripts' layermasks be properly set. For example, you could remove the Platforms layer and create a new MyGround layer. And then you'd need to modify your CorgiControllers' PlatformMask to target this new layer, that's all.

    As a general rule I'd recommend using layers, as the engine does, only for what they were intended, which is interaction definition (https://docs.unity3d.com/Manual/Layers.html). Using them for parallax level definition is a bit of a waste of precious layers, but I don't know that asset you mention and maybe there's a good reason for using them like that.
     
  50. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    @reuno
    thanks answer!
    I have an additional question: Are there any Layers that should never be removed?
     
unityunity