Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v6.1 : auto scrolling levels, and more]

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

  1. Miketysonjr

    Miketysonjr

    Joined:
    Mar 15, 2018
    Posts:
    22
    I got a problem. My character become invisible after i use checkpoint script .Everything else work fine , i still can control my character , make it run around , jump on anything, and the dirt animation still appear when it impact to the ground .... but it the character just wont show up itseft like i just use invisible magic . Lol
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @Miketysonjr > Have you checked the position of your character? Looks like either a sorting layer issue or your character is on the wrong z position.
    If the problem persists, please use the support form, and provide some details : how to reproduce in any of the demo scenes, what version of Unity, what version of the engine.
     
  3. saphira357

    saphira357

    Joined:
    Jun 22, 2019
    Posts:
    1
    Regarding the Advanced AI, I have an AI Enemy whose goal is to look for the player and fly towards him smoothly, non-linearly along some calculated curve and attack once in range. Since there will be multiple instances of this enemy, he should avoid overlapping his fellow mates. How can I accomplish this?
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @saphira357 > Create a custom flight action to implement that flight trajectory, and either in the action, or in a separate decision (depending on exactly how you want to structure your code), have it look for its flight mates and move in consequence.
     
  5. Miketysonjr

    Miketysonjr

    Joined:
    Mar 15, 2018
    Posts:
    22
    Oh my god, its really about z position , i change it from -38 to 1, and then it was showed up ... its so strange because there is only one raw layer and i didnt add any background or any other layer yet but by the way its worked ... thanks you so much , you really are an expert ....
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @Miketysonjr > You probably dropped your checkpoint and Unity assigned it a weird z based on your recent manipulations, or how you created the object. That puts it behind the camera, and thus it doesn't render on screen.
     
  7. polyconvex

    polyconvex

    Joined:
    Aug 17, 2018
    Posts:
    7
    Hello everyone!

    I'm using the Time Zone script to slow down time. When time is slower, the movement of everything is nice smooth slomo, but if there happens to be falling 2D physics rigidbodies in the scene, their slomo animation is very choppy/laggy. Maybe the same problem as here described: http://www.41post.com/4258/programming/unity-slow-motion-and-rigidbody-behavior

    I think it might have something to do with Time.fixedDeltaTime but I'm not sure. Has someone any advice and is it possible to get around this by extending the Time Zone script somehow for example? Cheers!
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @polyconvex > I can add support for that in the next release.
     
    Boom_Shaka and polyconvex like this.
  9. polyconvex

    polyconvex

    Joined:
    Aug 17, 2018
    Posts:
    7
    Oh sweet :--) Then I can focus on something else until the next release. You are awesome and thank you so much!
     
  10. shanemt

    shanemt

    Joined:
    Mar 5, 2014
    Posts:
    5
    Jumps often don't work when moving up a slope. Suppose you're walking up a slope to the right and you press jump. I think what's happening is that you move (right, up) from the jump, but in the next frame the raycast determines that you're touching the ground because the ground is also going up and to the right. The raycast reports back that you're grounded, and thus changes your state to being grounded. You can verify this easily in the MinimalSlopes Demo scene. Any solutions for this problem?
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @shanemt > If you think you've found a bug, please provide exact repro steps via the support form, as well as what Unity version and engine version you're using, thanks.
     
  12. shanemt

    shanemt

    Joined:
    Mar 5, 2014
    Posts:
    5
    I have another question. I made this 2D Platformer Pathfinding system for my old platformer before I began using the corgi engine. Now that I'm using the corgi engine, I'm trying to rebuild and improve that same system in the corgi engine. In order to accomplish the complex jumps/timings with my ai characters, I found it helpful to think of giving the ai characters a set of "inputs" in the same way that the player character received inputs. For instance, in a frame I might have an ai character be given a set of inputs like ("Space", "Shift", "D"). I'm having a hard time figuring out where I might insert something like that into the code for an ai character. Any help?

     
    Last edited: Jun 27, 2019
  13. TFGCo2

    TFGCo2

    Joined:
    Jun 10, 2017
    Posts:
    1
    Hey man, Im having troubles when building the project (without any mofications) for iOS with the Unity2018.4.2f1 and xcode 10.1
    I just keep getting this error "cannot user @try with objective-c exceptions disabled", on the KeychainAcessManager.mm. Ive changed the the objective-c try catch to a C++ try catch, and it builded! but this is not the solution Im looking for because Im not feeling safe to change the generated objective-c code to make it buildable.
    Do you have any clue about how to fix this?
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @shanemt > There are two ways (probably more) of doing that, either extend the input manager class and have your AI use that, or simply have your actions call each ability's public methods (that's how it's done right now).
    @TFGCo2 > I've never run into this issue before, so I'm not sure what the issue could be. It doesn't seem related to the engine though, looks more like a build issue, not sure what could cause this. Looking it up online it seems like a relatively common issue though, and this seems to be the most frequent answer : https://stackoverflow.com/questions...-objective-c-exceptions-on-xcode-4-2/11855447
     
  15. Mindjar

    Mindjar

    Joined:
    Aug 13, 2013
    Posts:
    28
    @shanemt - this looks great! Are You planning to share this code?
     
  16. Razouille

    Razouille

    Joined:
    Jan 25, 2013
    Posts:
    37
    Hello @reuno, it's really pleasant to see such updates after all these years past the release, so I would be interested by your engine, but first I would like to know if you handle any "depenetration" for the characters who got stuck by solid moving colliders. With default Unity rigidbodies the character is pushed through the collider then disappears out of screen, which is really annoying. I can fake a "go through" in the right way with basic movement, but it's quite a pain when handling rotating obstacles !
    Thank you in advance for your answer :)
     
  17. RGroff

    RGroff

    Joined:
    Feb 6, 2019
    Posts:
    3
    Having some difficulty adding additional 'CharacterHandleWeapon' scripts. I'd like to add the ability to handle multiple weapons, bound to different buttons. I see that this was done with the 'HandleSecondaryWeapon' script. I have tried duplicating that script, changing the dependencies to a third input binding, and then attaching the script to my player character, so he has 'CharacterHandleWeapon' , 'HandleSecondaryWeapon', and 'HandleThirdWeapon'. Using the third weapon is working, but there is an exceptionally long (4-5 second) delay from button press to the weapon actually firing. The delay seems to be in the WeaponState switch statement. Does this problem spark any ideas of another piece that I may be missing? Hoping I'm only missing something simple upstream.
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @Razouille > I don't believe there's such a thing right now, although I have to admit I'm not sure what you mean exactly. Usually you'll avoid having objects inside other objects in the first place. With a use case I may be able to provide a more accurate answer.
    @RGroff > I have no idea how you could cause a 4 seconds delay, unless you've explicitely said so. I'd suggest using debug tools to track the chain of events. If it only happens with your script you've probably made some mistake, but it's hard to guess what.
     
  19. Razouille

    Razouille

    Joined:
    Jan 25, 2013
    Posts:
    37
    Thanks for the answer, actually I want to put multiple moving colliders as solid (so not as 1 way platforms), but as they are also rotating sometimes the character can be squashed between two of them, like you can see in the picture. In this case logically the character should be pushed on the left, but with default Unity colliders it jitters and goes through the obstacles. I hope it's more understandable now :)
     

    Attached Files:

  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @being_jose > Please stick to the support form, no need to post your message everywhere, thanks.
    @Razouille > The engine is raycast based, you have to implement such unusual interactions on your own. In this case you'd have to detect such a situation and kill the character. But that's not built-in. I'd probably still go with physics if you want heavy rotations and collisions like that, that's like the textbook use case, and super easy to handle. Definitely easier to handle than manually with the engine.
     
    Razouille likes this.
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    Hey, there's an unofficial (meaning I'm not the one managing it) More Mountains discord server at https://discord.gg/nrbxdfk. It's a great community full of nice people using the Corgi Engine, TopDown Engine and/or other assets of mine. Don't hesitate to join and share your stuff there!
     
  22. luigi-freguglia

    luigi-freguglia

    Joined:
    Jun 30, 2015
    Posts:
    43
    @reuno I have a working MeleeWeapon, but about Particles: how I should flip them? If the particle effect is not symmetrical, it's enough to set the particle transofrm scale x to -1 to flip, but corgi will not do it for me or do I miss some option? In the case i should implement that, which is the method in MeleeWeapon to override
    Thank you
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @luigi-freguglia > You can use rotation instead of flip, or extend CharacterHandleWeapon / create a new ability that will take care of this.
     
    luigi-freguglia likes this.
  24. tallesmaziero

    tallesmaziero

    Joined:
    Feb 3, 2018
    Posts:
    14
    There is a drop script in Corgi Engine? Like when an enemy die and he drops something with movement like a coin that bounces a little.
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @tallesmaziero > No, there isn't yet (it's on the todo list). You can see a full list of features on the asset's website. If it's not listed, it's not in the asset (yet).
     
    AtomDesign and tallesmaziero like this.
  26. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    148
    What is the usage of mid height one way platforms?:)
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @Bagazi > You put them close to the ground, between the ground and your character's mid height, and your character will be able to walk past them or jump on top of them (from anywhere or from below).
     
  28. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    148

    Get it.
     
  29. Emphy

    Emphy

    Joined:
    Feb 7, 2014
    Posts:
    13
    I was wondering... I have a scene where I want to have my player spawn on start and have him follow a predefined path (with disabled input) like he is floating through space and things happen. But the way I have to bind a prefab to the LevelManager as the spawned player, I have to copy a player prefab and set the movement path component and points on the prefab and save it. Is there a way of putting in a player prefab in the scene and linking it to the level manager? So I can adjust things on my player for each scene specific without needing lots of copied prefabs? Maybe I want to disable a component in a certain scene or set different parts for speed etc.
     
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @Emphy > It'd be much easier to simply have a class do that binding on Start.
    You can get the LevelManager's current player easily, and then associate it to whatever script you want.
    Of course you can also get rid of the LevelManager altogether, and have your object in the scene, but if you expect other systems to work you'll have to do all bindings manually, which can take time. I'd recommend the first solution, one line against many :)
     
  31. Emphy

    Emphy

    Joined:
    Feb 7, 2014
    Posts:
    13
    That's a solid idea, probably indeed the best solution. I did the same for my ProCamera2D plugin, I bind that camera to the LevelManager instead of Corgi's camera.
     
    reuno likes this.
  32. Lubeaz

    Lubeaz

    Joined:
    Aug 12, 2016
    Posts:
    3
    Hi there! It's there a way to have like "Save Points" instead of CheckPoints? For example: I'm trying to set up a Boss Fight. It will chase the Player on sight (with the script AI Walk) and destroy obstacles on it's way. The problem I'm having is that when the Player dies during the chase, it simply respawn due the checkpoints, but every other element of the level just keep going (the boss stays in the last point it was when the player died, for example...so you can't try to beat him again). It's there a way I can "reset" the level, spawn the player in the last checkpoint and keeping the stats (like a life lost, points, health...)?

    PS. And no, Auto Respawn is not enough, it's not working for me. Thanks!
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @Lubeaz > There is no such feature right now. It'd be tricky to build that into the engine directly, as that's really something that'd differ from game to game. What you decide to save, and how, is hard to address at a generic level.
    The way I'd do it would be to have a LevelStateManager (or any other better term for it) that saves, on demand, the properties (position, health, etc) of the objects you're interested in (likely using the provided SaveLoadManager) and then instantiates (if needed) and sets these values back when loading the scene.
     
  34. Lubeaz

    Lubeaz

    Joined:
    Aug 12, 2016
    Posts:
    3
    Thanks for the quick response! Yeah...I was playing a bit with the SaveLoadManager and even with MMGame Events. But it requires more code knowledge than I'm capable right know. I just wanted to save the player progress until the last checkpoint, like many platform games do hehe... Well, it's ok. I'll try my best. Thank you again!
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @Lubeaz > It's not the easiest task to tackle, for sure :)
    But it's an interesting one.
     
  36. TheAngryTophat

    TheAngryTophat

    Joined:
    Apr 13, 2018
    Posts:
    5
    We were having an issue with it throwing errors. There was some sort of association issue. It's not happening anymore.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @TheAngryTophat > I'm glad it's working now then, thanks for letting me know!
     
  38. UnityIco

    UnityIco

    Joined:
    Jan 5, 2017
    Posts:
    9
    A quick question. Is it necessary to buy a unique corgi engine asset for each member on the project?
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @UnityIco > as explained in the asset store's terms and conditions :

    2.3.1 EXCEPT FOR EDITOR EXTENSION OR APPLICATION ASSETS, END-USER is granted a license to install and use Assets on an unlimited number of computers provided that these computers are either all (a) physically located at a single physical location ("Site") belonging to END-USER, or (b) laptops belonging to END-USER which have been made available by END-USER to its employees that are employed at the same Site provided all such computers have appropriately licensed Unity software installed. Consequently, any Asset may only be used at particular Site or on computers assigned to END-USER's employees employed at the same Site and may only be moved to another Site subject to prior written approval from Licensor.

    Short answer : no, you don't need to buy a license per seat in most situations.
     
  40. MisterDeum

    MisterDeum

    Joined:
    Apr 14, 2015
    Posts:
    20
    Hello @reuno, How do you unforce it ? Commenting it out doesn't work, setting it to false doesn't work.
     
  41. MisterDeum

    MisterDeum

    Joined:
    Apr 14, 2015
    Posts:
    20
    Oh ok, for people having a conflict with a mouse cursor, that just won't go away, it is in the weapon aim script that you will find a solution.
     
    reuno likes this.
  42. kor_

    kor_

    Joined:
    Mar 15, 2018
    Posts:
    7
    I just created basic 2.5D scene with some animations. Now that I have an idle animation, the "idle" state for the animation keeps firing all the time, so the animation is restarting all the time. Or if I press walk, then the "walking" keeps resetting the animation constantly. Is this by design or am I missing something?

    In the Corgi3DxTheHunt demo scene, the animation conditions are triggered only once so that the animations play smoothly.
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @kor_ > There must be something wrong with your animator setup then. Especially the transition to Idle. I'd guess its transition to self setting is wrong. Note that the animator is just native Unity, and you'll find plenty of info on how to setup your animations and transitions on Unity's website.
     
  44. kor_

    kor_

    Joined:
    Mar 15, 2018
    Posts:
    7
    I guess there might be something wrong with the animator setup. I was just comparing my animation controller's behaviour to the Corgi3DxTheHunt's and in the Corgi3DxTheHunt animation controller the "walking" state is triggered only once and the animation plays smoothly. And as the state ("walking") itself is part of Corgi and the animation controller only listens to the changes in it, I thought there could be something wrong with my Corgi setup.
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @kor_ > All the engine does is update the animator parameters, the rest is outside its scope.
    As long as you see your current state (Idle, Walking) to true when you're in that state, the engine's working correctly and your character setup is likely alright. All there is to tweak is your animator.
     
    kor_ likes this.
  46. kor_

    kor_

    Joined:
    Mar 15, 2018
    Posts:
    7
    Just if someone else has this problem, I had the "Can Transition To Self" checkbox checked, which meant the the transition was re-occuring all the time. Also I had to tune the Transition Duration and Offset to get the animations right.
    Thanks for the help!
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @kor_ > That was a lucky guess then :)
     
  48. pjooren

    pjooren

    Joined:
    Apr 12, 2017
    Posts:
    11
    I would also like to be added to the list of people who request that as a feature. Also, while on the subject of the gravity zones, I'm noticing that my weapons won't flip orientation to match the orientation of my character. For example, when I walk into a gravity zone with -8 gravity my character flips upside down and will be facing right, but the gun is still right-side-up and facing left. Am I missing something there, or is that not a feature (yet).
     
  49. pjooren

    pjooren

    Joined:
    Apr 12, 2017
    Posts:
    11
    Just an update. So I'm noticing that it does it when I have the weapon aim script added to the weapon which poses a problem if you have set a min and max angle.
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,117
    @pjooren > Gravity and weapons will work fine, but yes if you constrain to certain angles and flip these angles will remain. I'll add your vote to the push/pull in gravity zones.