Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. 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,110
    @unity_YoaP2NCvxCuybA > I think what you're referring to is the Cinemachine camera noise that is setup by default in the demos. I'd recommend creating your own camera that suits your own needs, but if you want to repurpose on of the demos', I'd suggest disabling on the virtual camera.
    @Fed81 > Oh I am taking requests, I get a ton of them a day via the contact form :) That said I can't say I've ever had similar requests. These (take cover, retreat, defend) are not AI actions, at least not in the context of the engine, they'd be more like behaviours or attitudes, or archetypes even. You can already implement such behaviours using the AI actions and decisions included in the engine (Retreat would be something like if health is below X and enemy is closer than Y, then move in Z direction). I don't see any current limitation in that regard, unless I misunderstand the use case.
     
  2. Amalfi-Prozen

    Amalfi-Prozen

    Joined:
    Feb 2, 2014
    Posts:
    42
    ok, I solved it by myself, i decreased the player movement speed (it was very fast). Probably with such high speed it ignored collisions and then created the big jump, I don't know, maybe it's a bug.
     
  3. unity_YoaP2NCvxCuybA

    unity_YoaP2NCvxCuybA

    Joined:
    Mar 16, 2019
    Posts:
    17
    ----
    You are right, it does work for the Machine gun, but it doesnt work for the rocket launcher, for example. So there is something else I should modify from the weapon itself, or just the "Character Handle Weapon", invert horizontal Aim option?
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @unity_YoaP2NCvxCuybA > The rocket launcher's aim is driven by mouse position by default, that's why it aims wherever your mouse is pointing at.
     
  5. unity_YoaP2NCvxCuybA

    unity_YoaP2NCvxCuybA

    Joined:
    Mar 16, 2019
    Posts:
    17
    Does it work with melee weapons?
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
  7. unity_YoaP2NCvxCuybA

    unity_YoaP2NCvxCuybA

    Joined:
    Mar 16, 2019
    Posts:
    17
    I am doing the obvious and just setting the "Invert Aim on Wall Clinging", and nothing. Sorry to pester you with questions, but wondering if something else should be done.
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @unity_YoaP2NCvxCuybA > You've lost me. You were asking if mouse aim worked on melee weapons, now we're back on invert aim. If your issues persist, please use the support form, and explain what you're trying to accomplish, and what you're doing to achieve it.
     
  9. unity_YoaP2NCvxCuybA

    unity_YoaP2NCvxCuybA

    Joined:
    Mar 16, 2019
    Posts:
    17
    I am
    1- First question was about, weapons that fire bullets, (machine guns, etc). I tried replicating, that with your FeaturesWeapons demo, with some success.
    2- I am trying to use the same mechaninc "Invert Aim on Wall Clinging", on a melee weapon, but it doesnt work. There is no AIm or nothing like that here.
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @unity_YoaP2NCvxCuybA > Yes, that seems normal, as you need a WeaponAim component to be able to reverse its aim. Add one :)
     
  11. unity_YoaP2NCvxCuybA

    unity_YoaP2NCvxCuybA

    Joined:
    Mar 16, 2019
    Posts:
    17
    So, the weapon has a Melee weapon component and WeaponAim component, anything special on the weapon aim, component or melee weapon, settings?
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @unity_YoaP2NCvxCuybA > No, nothing special, the reverse aim setting will reverse the WeaponAim's aim direction, that's all there is to it.
     
  13. Creotronic

    Creotronic

    Joined:
    Oct 31, 2020
    Posts:
    4
    Maybe I'm not finding this in the FAQ or the documentation, but what would be the best way to update the engine in an existing project?
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
  15. Creotronic

    Creotronic

    Joined:
    Oct 31, 2020
    Posts:
    4
    reuno likes this.
  16. unity_YoaP2NCvxCuybA

    unity_YoaP2NCvxCuybA

    Joined:
    Mar 16, 2019
    Posts:
    17
    I cant get them to work, I will email, you with some pictures, of what I am doing, with the support form, to try and see what I am doing wrong :(.
     
  17. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    11
    So the Feedback documentation is a little limited and wanted to ask here. I'm trying to do a simple "set active" feedback on a weapon in use, when the player hits the weapon button. State on hit is set to inactive, state on play is set to active, and set state on stop is inactive.

    For some reason the game object is staying on screen. Am I missing something here in the logic of the states? I tried mixing it up different ways but can only get it to not appear while in use.

    Do I need to set another feedback with a set active component on a weapon stop feedback to cancel it out? That's the only thing I can think of right now but I had to leave my workstation for the day before I could try it.
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @NonhumanStoltz > The documentation (https://feedbacks-docs.moremountain..._1_feedbacks_1_1_m_m_feedback_set_active.html) covers all the fields of that feedback, I'm not sure what else to add, but please let me know!

    That said, there's no "state on hit", there's "state on init", which (see doc above) defines whether or not we should alter the state of the target object on init. Same goes for play, stop, etc.

    For example, in the following example, that MMFeedbacks contains a SetActive feedback. When played, that feedback will turn its TargetGameObject, Main Camera, to inactive (as its SetStateOnPlay is true, and the selected state is Inactive).

    upload_2021-3-2_20-54-0.png

    As I do not know what you're trying to accomplish, or what behaviour you expect with that weapon, it's hard to tell how to set things up in your context, but that's how that feedback works, hopefully that'll help.
     
  19. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    11
    Thanks for the response! Sorry, meant state on init, which I assumed meant initialize. I'm trying to make a game object with a sprite render appear and then disappear. It's a melee weapon too, which probably makes a world of difference in context.

    As for documentation, I was referring to the "Animations, Explosions,...." bit. Particles are a bit advanced for me that's why I'm going with this more basic function first and then play with particles. I understand Feedbacks are more recent of an update to the corgi asset so I didn't mean to sound ungrateful there and do apologize for that. Tbh a breakdown of each individual feedback like how you have in animation parameters would be hella awesome since that's what makes games fire.
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @NonhumanStoltz > There's a breakdown of each feedback at https://feedbacks-docs.moremountains.com/list_mmfeedbacks.html, and a demo of each and every feedback is included in the asset (and on https://feedbacks.moremountains.com/), I'd recommend checking it out, it showcases them all.
    Now if you want your weapon to disappear (and I assume remain usable) then you'll want to target its renderer, and enable/disable that. Setting the Weapon itself active/inactive is bound to cause all sorts of issues, I wouldn't recommend it.
     
    NonhumanStoltz likes this.
  21. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    11
    Oh that's perfect!
     
    reuno likes this.
  22. jasss

    jasss

    Joined:
    Feb 18, 2015
    Posts:
    4
    Hey there,
    Is it documented anywhere on how to set up the Star point score system?
    I am using the Mesa1 demo, and would like to set up the star counter such as the one on Retro Adventure
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @jasss > Stars in the RetroAdventure demo scenes use a simple script that sends a CorgiEngineStarEvent when picked. The RetroAdventureProgressManager listens to that event, and updates a simple counter.

    I'd recommend replicating such a system to handle your own progress and its specifics. You can learn more about it in the documentation : https://corgi-engine-docs.moremountains.com/save-and-load.html
     
  24. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    11
    Is there any way I can have the player character spawn an AI character for a limited time and then die? Not like Lost Vikings where you switch control of characters or change the character model, but (and correct me if I'm using the wrong terminology here) instantiate a prefab and then it dies. You'd essentially be spawning minions to do the fighting for you while you jump around avoiding fire.

    I think I can do a rough custom code for it but not sure, and that'd be a really awesome ability to have even though it's probably super niche.
     
    Last edited: Mar 6, 2021
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @NonhumanStoltz > It would indeed be as simple as instantiating AI prefabs (and optionnally killing them after a while I suppose). And while it'd be fun, you're the first person to request such a thing in 6 years, so you're right, it's super niche :)
     
  26. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    11
    Well I feel both disappointed and honored.
     
    reuno likes this.
  27. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    That's something easy to do with feedbacks already, simply as reuno stated. Give it a try :)
     
    NonhumanStoltz likes this.
  28. NonhumanStoltz

    NonhumanStoltz

    Joined:
    Dec 6, 2020
    Posts:
    11
    Oh I didn't think of that! Thanks, I'll try it out this week.
     
    reuno likes this.
  29. yano_123

    yano_123

    Joined:
    Aug 24, 2012
    Posts:
    40
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @yano_123 > No, it's there alright. What version are you on? You can check that in the readme.
     
    yano_123 likes this.
  31. yano_123

    yano_123

    Joined:
    Aug 24, 2012
    Posts:
    40
    Ah, its my fault. I updated corgi engine v6.5 to v6.7 and I can download the MMFeedbackDestroy.cs now.
    By the way, I also checked topdown engine v1.10.1, there is no MMFeedbackDestroy.cs, right?
     
  32. kava_4

    kava_4

    Joined:
    Sep 28, 2020
    Posts:
    3
    Hey @reuno. Im getting CS1p61 error on AIActionSwapBrain('AIBrain' does not contain a definition for 'ResetBrain'), AutoRespawn(Same AIbrain) and GUIManager ( 'MMProgressBar' does not contain a definition for 'SetBar' )
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @yano_123 > It's not in TDE (yet), it will be in the next release though. You could grab one and put it in the other in the meantime, it'd work.
    @kava_4 > In what context are you getting these errors? Is that in a fresh install? If yes, what version of Unity? What version of the engine?
     
    yano_123 likes this.
  34. kava_4

    kava_4

    Joined:
    Sep 28, 2020
    Posts:
    3
    @reuno unity 2020.2.6f1 and the 6.7 version of the engine. I just imported the engine into a new empty project. on LTS version everything is ok. i'll stick with it
     
    Last edited: Mar 9, 2021
    reuno likes this.
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @kava_4 > I suppose something may have gone wrong with 2020, it's got a lot of issues with the package manager at the moment. Your errors seem to point at that (parts of the classes not being there). Usually emptying the asset store cache fixes the problem. Sticking to a more stable version of Unity (2019.4) is safer :)
     
    kava_4 likes this.
  36. unity_YoaP2NCvxCuybA

    unity_YoaP2NCvxCuybA

    Joined:
    Mar 16, 2019
    Posts:
    17
    Hi there, i am trying to combine Proximity Managed, with a child object that is a TimedEnemySpawner. So only when I get close to the Proximity Managed, object it stars spawning objects. Somehow it doesnt, work. I can make them work wach on its own Proximity Managed enemies that appear when I am close, and vanish when I am not around, and also have a spawning objects, point that makes enemies forever. Here is a picture of I have it setup. Somehow it doesnt do anything when I am close it. https://drive.google.com/file/d/1BaZacosmWU7fPsFGcz9Jb5JCHXEjEl6e/view?usp=sharing
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @unity_YoaP2NCvxCuybA > Not sure what your issue may be, your image is not enough to tell. Repro steps in a demo would help.

    Here's are some steps that I've just tried and that seem to work just fine :

    - in a new install of Corgi Engine v6.7, in Unity 2019.4.21f1
    - open the MinimalPerf demo scene
    - create a new empty game object, position it at -30,-5,0, call it SpawnerContainer (note that it's not mandatory to create such an object, but I'm trying to stay close to your case)
    - on that object, add a ProximityManaged comp, set its Enable and Disable Distances to 30
    - create an empty child, add a TimedSpawner component to it, and a MMSimpleObjectPooler component.
    - on that last one, set the GameObjectToPool to BlueRobot
    - press play, notice the spawner is inactive and not doing anything, get close to it, it'll start spawning robots, move back left, it'll stop (of course it's a weird setup as the ground disappears and thus the robots fall, but that's just an example to show it works)
     
  38. unity_YoaP2NCvxCuybA

    unity_YoaP2NCvxCuybA

    Joined:
    Mar 16, 2019
    Posts:
    17
    --

    Thanks for this! I was missing the MMSimpleObjectPooler. Sorry about that!
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @unity_YoaP2NCvxCuybA > You had one in your screenshot so I didn't think that could be it. I'm glad it's working now though!
     
  40. xuldark87

    xuldark87

    Joined:
    Mar 16, 2021
    Posts:
    1
    Hi! I just recently got the Corgi engine and trying to build a twitchy 2d platformer,

    I ran towards a problem where if the player jumps up towards or fall against a tile collider corner (edge)
    the player rebounds as if it was a bumper,
    and if by any chance after the first reboun you fall on another corner edge the velocity multiplies and so on.

    Ive tried to soften the edges of the collider so its more round but still doing the same.
    I tried to replicate the situation on the demos and it seems it doesnt happen.


    How do i stop the collider corners sendind me into another dimension?
    Thanks!
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @xuldark87 > If it doesn't happen in the demos, then it's likely an issue in your scene, or with your character (or both). Without any repro steps it's hard to tell what though. It could be a wrong platform/layer setup, incorrect raycast settings, maybe something else. If the issue persists, don't hesitate to use the support form and provide repro steps I could use to reproduce the issue on my end and see what the problem may be.
     
  42. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    512
    I'm experiencing some jitter when using unity's pixel perfect camera (stretch-fill mode) and corgi, is there a way of forcing the player speed to match integer positions so it doesn't have the jiggling look when moving?
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @Zebbi > No, there is no such option.
     
  44. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    512
    What's the generally accepted method of solving this, just trial and error with the player speed?
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @Zebbi > I'm not aware of any particular issue with character movement and speed at the moment, none have been reported. But I have to admit I don't know of many productions that use Unity's builtin pixel perfect solution, most people seem to be rolling their own.
     
  46. ScotianWolf

    ScotianWolf

    Joined:
    Feb 3, 2021
    Posts:
    9
    Building a game off of the Retro Adventures Levels. (I simply re-did the scenes to fit my custom game keeping all of the main set-ups in the scene)... Level 1-5 is working good in terms of the Star Counter, however I'm now working on a Level 6 and I can't get the stars to work for this level although it collects them it just doesn't add it to the count.

    These are the steps that I tried.

    - Went into the Retro Level Adventure Selection Screen,
    - Duplicated the Level 5 , renamed it to fit the new scene
    - Went into the " RetroAdventureProgressManager " And set everything accordingly.

    Any idea on what I could be missing while setting up new level? I duplicated my level 5 scene so that I could just test it out and that's when I realized it wasn't adding the star count
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @ScotianWolf > Unfortunately these steps are not enough to tell what you did wrong, they're too vague. What do you mean by "set everything accordingly"? What version are you on? What do you mean by "to fit the new scene"? Etc.

    Here are repro steps I just took that work fine :

    - create a new project in Unity 2019.4.22f1
    - import Corgi Engine v6.7
    - duplicate RetroAdventure3, name it RetroAdventure6
    - add that newly created scene to the build settings
    - open RetroAdventureLevelSelection, under the Content node, duplicate the RetroAdventureLevel5 node, change its ItemTitle's text to "Level6", on its RetroAdventureLevel comp, change scene name to "RetroAdventure6"
    - on the RetroAdventureProgressManager (in that scene and on the prefab), add a 6th scene, set its name to "RetroAdventure6"
    - press play, go through the levels
    - at the end of lvl 5 you get redirected to the level selection (that's normal, we didn't change the exit scene in that level)
    - play level 6, collect some stars in it, return to level selection, enjoy your newly collected stars :

    upload_2021-3-19_11-0-2.png
     
  48. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    512
    I'm working with corgi and have gotten a lot of the movement working super well, but I'm just looking at hitscan weapons and there seems to be a lot of built-in functionality that I'd like to take advantage of. I'd like to recreate the Dangerous Dave style of gun control:


    • Aiming at diagonal angles forces the player to stop moving whilst the diagonal angle is held
    • Firing whilst moving left/right stops the player during the shot, then they resume walking
    • Recoil movement to the player (which I see is built-in)
    • The hitscan fires a scatter of bullets rather than just one shot
    I'd personally also like:
    • The player can fire mid-air in the direction aimed
    • If the hitscan raycast hits the edge of the screen, a bullet spark is spawned there
    I think most of this should be simple, but some of it involves adjustments to the player movement, etc. I can code, so there's no worries with doing any or all of this myself, I just want to get a rough idea of the best place to start, ie: extending the hitscan weapon script or writing a new script from scratch that handles everything.
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,110
    @Zebbi > Both would work. I guess extending the hitscan weapon would be the easiest way to implement simple mechanics like this.
     
  50. Creotronic

    Creotronic

    Joined:
    Oct 31, 2020
    Posts:
    4
    I'm currently fine-tuning the movement and am only missing two things:

    - It seems as if it is possible to limit the directions a character can dash in, but I'm not sure how exactly that works. Can I limit the character to only be able to dash left or right and not vertically (up and down)?
    - It seems as if walljumping by pressing the direction away from the wall and the jump button at the same time does not work out of the box. Is there any way to do this or would that require custom code?
     
unityunity