Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[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. natsuha816

    natsuha816

    Joined:
    Aug 13, 2021
    Posts:
    3
    Thank you!!
     
    reuno likes this.
  2. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    93
    I am brand new to the framework and it is exciting and also overwhelming but it makes more sense each day. I watched some videos about doing attacks with projectile weapons and melee weapons. In these demonstrations, the weapons were represented as separate sprites that are on top of the main character sprite and animate separately, and actually I don't think the main character sprite got animated during attacks.

    I can see how this could work but it is not what I need for my game. I don't use a separate sprite for attacks, and I just need the main character sprite to animate for the attack. For example if swinging a sword, there isn't a separate sword sprite, just that the main character sprite is now drawn with sprite frames swinging the sword. It's all one sprite.

    Are there any examples or video tutorials showing how to set this up?
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @brittany > Sure, you can look at the RetroCorgi prefab for an example of a melee sword attack that doesn't use a separate sprite. There's a pickable sword using that prefab at the start of the RetroAI demo scene. As for how to set it up, it's all explained in the documentation at https://corgi-engine-docs.moremountains.com/weapons.html
     
    brittany likes this.
  4. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    93
    Thank you so much Reuno!
     
    reuno likes this.
  5. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    Hello, I want to add a custom button for my players, how to change the Settings? I can't find a place to set it. For example, player 1 moves left or right and defaults to AD, jumps to space, and sprints to SHIFT. I want to change to move is AD, jump is W, I change how to set in which script. thank you
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @jqxyx > As explained in the documentation, input bindings are changed like in any Unity project, via the input manager panel.
     
  7. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    My English is not good, so I rely on translation software to check. I'm really sorry. I'm studying hard. From China
     
    reuno likes this.
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @jqxyx > No problem at all!
     
  9. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    Is it this script? I'm not very clear about the design of the code, and I don't find anything here to change the button.
     

    Attached Files:

  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    jqxyx likes this.
  11. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    Thank you very much. I found... Haha, I didn't expect you to reply to my question so timely. I thought it would have to wait until tomorrow ,upupup
     
    reuno likes this.
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    Hey there! Good news, I just pushed v7.4 of the Corgi Engine to the Asset Store.
    As usual, it fixes all known bugs to date, and brings the new version of the Inventory Engine, v3.0.
    I hope you'll like it!
    Full release notes :

    - Adds AIActionResetTarget, an action that lets you empty your AIBrain's target
    - Adds collider offset support to Rooms
    - Adds checkpoint support to Cinemachine Zones
    - Adds extra options to the AutoMovement ability to change direction automatically on fall, on collision, or on grounded collision
    - Adds Character Swap and Switch support to the Proximity Manager
    - Adds an InvincibleWhileDashing option to the Dash ability, turning off all damage to a dashing character if set true (false by default)
    - Adds an option to WeaponAim to specify the z position at which the reticle should display (if chosen to display it)
    - Adds an option to the InputManager to force a state reset on all buttons when losing player window focus
    - Adds extra sanity check to CharacterLadder
    - Tweaks script order on projectile weapons
    - The CorgiController now exposes its ObstacleHeightTolerance value
    - The AIBrain will now stop at the first valid decision when evaluating multiple decisions instead of iterating over the following ones
    - Fixes a bug that could cause gravity points to not work after dying inside one of them
    - Fixes velocity not being clamped correctly when using certain force set methods
    - FIxes a bug that would cause input buffer to alter the remaining amount of jumps in some edge cases
    - Fixes an #endregion typo in the Weapon class
    - Fixes bugs that could cause lives to not reset to the right number when using stored characters and persistence
    - Fixes a bug that would cause auto setup of cinemachine zones to trigger an error when building to WebGL
    - Fixes a bug that would cause errors on death if no animator was set
    - Fixes a wrong setting in the RetroProcedural demo scene where the random procedural generation had been turned off, resulting in infinite disappointingly identical levels
    - Fixes a typo in the Health:TemporarilyInvulnerable attribute
    - Fixes a bug that could result in a stuck pause when doing a certain sequence of opening/closing inventories and pausing while using a gamepad
    - Disabling Damage via Health:DamageDisabled() now doesn't disable knockback (use Health:ImmuneToDamage to prevent knockback)
    - Changes the follow up state for swim to Jumping (from Idle)
    - The CharacterGroundNormalGravity ability is now properly marked as experimental
    - The CorgiEngineSound Feedback can now be found in the Audio subfolder with all other Audio feedbacks
    - Fixes a button's text color on the RetroAdventure GameOver scene
    - Updates MMFeedbacks to its latest version
    - Updates MMTools to its latest version
    - Updates Inventory Engine to v3.0 (warning : many Inventory methods have changed to add support for a PlayerID, check their new signature if you've extended some inventory related classes)
     
  13. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    @reuno Hello, I'm having this issue: I need to completely change the animator at runtime, my (naive?) approach is:
    Code (CSharp):
    1. GetComponent<Character>().CharacterAnimator = MyMecanimObject.GetComponent<Animator>();
    2. GetComponent<Character>().AssignAnimator();
    The other animator has the same states and transitions because it's a copy of the working one, only bounded with different motions.
    It changes the animator but the transitions does not work anymore.
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @luigi7 > As explained in the documentation, you'd also have to bind animators on all abilities again, they cache it for performance. And once more, please stick to the support form for support questions or if you need my help specifically. Please don't @ me here, thanks.
     
  15. bl4ckfr05t

    bl4ckfr05t

    Joined:
    May 13, 2017
    Posts:
    4
    Hello, what's the optimal method to access the current room in a scene?
     
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @bl4ckfr05t > Parse a list of your rooms, and find the one with CurrentRoom:true;
     
    bl4ckfr05t likes this.
  17. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    Hi, I added the Corgi controller and the Character Horizontal Movement component, but when I use AD to move, whether I press A or D, it goes to the right. I noticed that the Y-axis Angle has changed (flipped 180 degrees). It didn't do that the last time I used it. How can I fix this. thank you
     
  18. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    The last problem. that was solved. But new problems have arisen. When I used the Character Jump component and set the jump height to 160 or more, it did not jump higher. The current problem is that the character jumps too low. It didn't meet the requirements of my game.
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @jqxyx > It's hard to tell what your mistake could be without exact steps, or even any context.
    Changing the height of a jump is as simple as changing a single value in an inspector, I have to admit I'm not sure what could go wrong, nobody's ever reported issues with that.

    If you run into issues, please provide exact repro steps and context, via the support form, thanks.
    Here are examples of such steps to change the height of a jump :
    - in a fresh install of Corgi Engine v7.4 on Unity 2019.4.36f1
    - open the MinimalLevel demo scene
    - duplicate Platform1000x100 (6), position the new one at -5,0,0
    - press play, then space to jump, notice you jump approximately to the height of that platform but can't reach it
    - select the Rectangle prefab, change its JumpHeight from 3 to 8
    - press play, you can now jump high enough to jump on the platform
     
  20. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    Ok, thank you very much. I'm going to animate the character. How do I get the motion state of the controller
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
  22. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    Hello. When I use this class. The player moves the box very slowly, and I changed all the parameters without changing it. Did I miss something
     

    Attached Files:

  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @jqxyx > Probably, but without knowing what you're doing, how you're testing, or where, I can't guess.
    You'll find a demo of that in the engine, I'd suggest testing that first, box will move fine when carried.
    And once again, please use the support form if you need support, thank you : https://corgi-engine.moremountains.com/corgi-engine-contact
    Make sure you provide the required info and some context about your problem.
     
  24. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    Oh, I made a mistake. This is not the class I want. What I want is to push the crate, which class should I add?
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @jqxyx > Please use the form above.
     
  26. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    I added a moveable rigid-body wooden box, but the character had a hard time pushing it, why
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
  28. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    • My object's magnification is 25. Scale =25
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @jqxyx > I don't know what magnification is in that context. Can you please just read my messages above please, and stop spamming this thread?
     
  30. jqxyx

    jqxyx

    Joined:
    Sep 8, 2020
    Posts:
    14
    Not a function, just a general push object. The object is moving very slowly, whether the speed is restricted. Because my object's scale is equal to 25, so it looks slow, it looks normal when it's scale is equal to 1.
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @jqxyx > Please stop the spam now. There's a support form if you need support, please use it.
     
  32. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    19
    In a corgi 3d level, what would prevent the model from rotating to the other direction? I'm trying to implement it at my job but we mostly do environments not animations on models. Currently it's a humanoid rigged character and I'm just trying to test the horizontal movement, but so far the dude just keeps moving forward no matter which direction. On the 2d game I'm personally working on it's simple enough, just flip the sprite upon changing direction, but will I need to make a walking left and walking right animation instead of just recycling a walking forward animation for both left and right?

    I can't take any screenshots right now since when I left my workstation I thought it was just something buggy with my animator or animation (which real talk usually is) but if there's anything that would restrict model flipping I'd like to know where I should look. The Corgi3d prefab character had generic animations so I don't know if the humanoid rig and animations is messing it up or not. I couldn't find documentation on how a 3d scene or character is supposed to be set up with corgi but from what I could tell in the demo scene it's essentially a change in the art assets since it's still running on 2d colliders and tags like the 2d levels.
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @NonhumanStoltz > The engine doesn't do any animation, Unity does. And there's no difference between 2D and 3D as far as the engine is concerned, visuals are up to you, whether you use 2D, 3D, tilemaps, etc, the engine handles logic only. There's nothing in the engine that'd prevent a model from rotating, whatever the type of your model, or the type of its animations.
    Make sure your Character is set to rotate on flip though.
     
    NonhumanStoltz likes this.
  34. bl4ckfr05t

    bl4ckfr05t

    Joined:
    May 13, 2017
    Posts:
    4
    Hello, sometimes the joystick knob's position gets stuck with some offset.
    This happens for me when I disable the UICamera in a button-activated zone.
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @bl4ckfr05t > If you disable it, the joystick can't reset, it needs to be active to do so. You'll have to reset it manually. If you look at its API documentation you'll notice it's got a SetNeutralPosition method, that's what you'll want to use.
     
    bl4ckfr05t likes this.
  36. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    19
    So turns out it was a combination of the model being set to the actual model and not the nester game object that has the feedbacks, as well as the flip model being check marked instead of rotate. Works beautifully now, thanks!
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
  38. 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.
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    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
     
  40. EarlyDarkEntertainment

    EarlyDarkEntertainment

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

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
  42. 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?
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @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.
     
  44. jqxyx

    jqxyx

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

    reuno

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

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    56
    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
     
  47. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

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

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @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.
     
  49. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

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

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @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.