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. Pan_Likes_Brains

    Pan_Likes_Brains

    Joined:
    May 19, 2016
    Posts:
    13
    I was thinking all this time, what a useful tool that would be, with all your super helpful implementations on Corgi, using it for a top-down. And here you are, you're a star!

    And the pestering question of, any ETA (very rough) on its first release?
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @GTsphere > I think the best way to do that would be to add a new Ability, that would override the base ability Flip method (it's called by the Character component for all abilities everytime you turn around). In it, you'd just have to trigger an animation (possibly a different one depending on what direction you'd be facing).
    @Pan_Likes_Brains > Somewhere in the first 3 months of 2017 hopefully. I've already got a solid base, I'm just adding more and more features. It's a discussion (with myself) at the moment to decide how much is enough for a v1 release.
     
    AlanOToole, Xain and Pan_Likes_Brains like this.
  3. Pan_Likes_Brains

    Pan_Likes_Brains

    Joined:
    May 19, 2016
    Posts:
    13
    Please do keep us posted, I'm sure you'll have a big fanbase right upon release, the templates in asset store are far from ideal so far, the 2D ones are only a couple, and none match your coding practice (top notch so far). This was a good move.
     
    reuno likes this.
  4. hafizmrozlan

    hafizmrozlan

    Joined:
    Jun 15, 2012
    Posts:
    117
    Hey, just a quick one. Does Corgi Engine move the player using transform.Translate or rigidbody.movePosition? Or neither?
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    hafizmrozlan > Neither. It's a raycast based engine with its own controller and movement system.
     
    AlanOToole likes this.
  6. AlanOToole

    AlanOToole

    Joined:
    Sep 7, 2013
    Posts:
    132
    That's a great call @reuno, thank you! Do you have any advice on implementing sliding due to inertia? So for example running to the right but the player switches directions to the left quickly. Instead of instantly moving to the left having a sort of delay where the character slides to a stop then faces left and and continues moving left.

    Your Corgi controller is absolutely amazing, seriously, nice work.

    Thanks!
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @GTsphere > For inertia, I'd say you could extend HorizontalMovement to add an inertia factor and lerp newHorizontalForce by that factor. And thanks, I'm glad you like the engine :)
     
    AlanOToole likes this.
  8. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi,

    I was trying to do something simple, but ended up losing the morning on this, so I think I'm missing some info.

    I need to randomize a crowd, and all went well. Until I decided to randomize the initial facing direction.

    Now, I would have assumed I just needed to call the Flip method or setting the IsFacingRight to a random value would have helped me to achieve this result, but I'm clearly missing something probably pretty obvious.

    At first, I only tried to flip the facing from inside my CrowdRandomizer component attached to each person in the crowd.

    I subclassed the original horizontal movement, the AI Patrol class, I usually end up with people moonwalking, having perpetual flipping seizures while moving, and other glitchy results, so I decided to ask in the thread.

    This is my setup of each person in the crowd:









    This is the CharacterHorizontalMovementAnimSpeedScaled script (it only tweaks the speed of the movement according to a multiplier which I set from elsewhere):

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using MoreMountains.CorgiEngine;
    4. using MoreMountains.Tools;
    5.  
    6.  
    7. public class CharacterHorizontalMovementAnimSpeedScaled : CharacterHorizontalMovement {
    8.     public float animSpeedMultiplier;
    9.     /// <summary>
    10.     /// Sends the ACTUAL speed and the current value of the Walking state to the animator
    11.     /// </summary>
    12.     public override void UpdateAnimator()
    13.     {
    14.         MMAnimator.UpdateAnimatorFloat(_animator,"Speed",Mathf.Abs(animSpeedMultiplier * _normalizedHorizontalSpeed),_character._animatorParameters);
    15.         MMAnimator.UpdateAnimatorBool(_animator,"Walking",(_movement.CurrentState == CharacterStates.MovementStates.Walking),_character._animatorParameters);
    16.     }
    17.    
    18.     /*public override void Flip()
    19.     {
    20.         base.Flip();
    21.        
    22.         //_horizontalMovement *= -1;
    23.         _character.IsFacingRight = !_character.IsFacingRight;
    24.     }*/
    25. }
    26.  
    And this is my CrowdRandomizer, with lots of stuff commented out because I really couldn't figure out what was going on.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using MoreMountains.CorgiEngine;
    4.  
    5. public class CrowdRandomizer : MonoBehaviour {
    6.     [Header("Facing")]
    7.     public bool randomizeInitialFacingDirection;
    8.    
    9.     [Header("Speed")]
    10.     public float speedMultiplierMin;
    11.     public float speedMultiplierMax;
    12.     public float speedChangeDelayMin;
    13.     public float speedChangeDelayMax;
    14.     public float speedSmoothing;
    15.    
    16.     [Space(8)]
    17.     [Header("Scale")]
    18.     public Vector3 scaleMultiplierMin;
    19.     public Vector3 scaleMultiplierMax;
    20.    
    21.     protected Vector3 cachedLocalScale;
    22.    
    23.    
    24.     protected Character cachedCharacter;
    25.     protected CorgiController cachedController;
    26.     protected CharacterHorizontalMovementAnimSpeedScaled cachedHorMov;
    27.     protected NPCWalk cachedNPCWalk;
    28.     protected float cachedBaseSpeed;
    29.    
    30.     protected float targetSpeed;
    31.    
    32.     protected Vector3 lastLocalScaleMultiplier;
    33.    
    34.     protected virtual void Awake()
    35.     {
    36.         cachedLocalScale = transform.localScale;
    37.         cachedController = GetComponentInChildren<CorgiController>();
    38.         cachedCharacter = GetComponentInChildren<Character>();
    39.         cachedHorMov = GetComponentInChildren<CharacterHorizontalMovementAnimSpeedScaled>();
    40.         cachedNPCWalk = GetComponentInChildren<NPCWalk>();
    41.         cachedBaseSpeed = cachedHorMov.MovementSpeed;
    42.        
    43.         if (randomizeInitialFacingDirection)
    44.             RandomizeFacing();
    45.     }
    46.    
    47.     protected virtual IEnumerator Start () {
    48.         yield return null;
    49.         RandomizeScale();
    50.         RandomizeSpeed();
    51.     }
    52.    
    53.     public virtual void    RandomizeFacing()
    54.     {
    55.         cachedCharacter.InitialFacingDirection = (Random.value < 0.5f)? Character.FacingDirections.Left: Character.FacingDirections.Right;
    56.     }
    57.    
    58.     public virtual void RandomizeScale()
    59.     {
    60.         lastLocalScaleMultiplier = new Vector3(
    61.             Random.Range(scaleMultiplierMin.x, scaleMultiplierMax.x),
    62.             Random.Range(scaleMultiplierMin.y, scaleMultiplierMax.y),
    63.             Random.Range(scaleMultiplierMin.z, scaleMultiplierMax.z)
    64.         );
    65.        
    66.         transform.localScale = Vector3.Scale(transform.localScale, lastLocalScaleMultiplier);
    67.     }
    68.    
    69.    
    70.     public virtual void RandomizeSpeed()
    71.     {
    72.         targetSpeed = cachedHorMov.MovementSpeed = cachedBaseSpeed * Random.Range(speedMultiplierMin, speedMultiplierMax);
    73.        
    74.         Invoke("RandomizeSpeed", Random.Range(speedChangeDelayMin, speedChangeDelayMax));
    75.     }
    76.    
    77.     public virtual void Update()
    78.     {
    79.         cachedHorMov.MovementSpeed = Mathf.Lerp(cachedHorMov.MovementSpeed, targetSpeed, Time.deltaTime * speedSmoothing);
    80.         cachedHorMov.animSpeedMultiplier = (cachedHorMov.MovementSpeed / cachedBaseSpeed) / lastLocalScaleMultiplier.x;
    81.         //cachedController.Parameters.SpeedFactor = cachedHorMov.MovementSpeed / cachedBaseSpeed;
    82.         //cachedHorMov.SetHorizontalMove(cachedHorMov.MovementSpeed);
    83.     }
    84.    
    85.     void OnDestroy()
    86.     {
    87.         CancelInvoke("RandomizeSpeed");
    88.     }
    89. }
    90.  
    ...and nothing. Some persons just moonwalk around, reach a border and flip, moonwalking in the opposite direction.

    I'm confused and definitely out of focus, could you please help me?
    I simply want to randomize the initial facing direction. subclassing the whole character or controller seems a bit excessive to me. Is that the only way?
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    Well setting IsFacingRight to a random value is obviously bound to cause issues. It's a state, it doesn't flip your character, there's a Flip() method for that.
    You'll also want to check the InitialFacingDirection property on the Character component of your prefab, it needs to be set (once, when creating the prefab) depending on your character sprite/model. Don't change that when randomizing.
    All you need to do is call the Flip() method once your character is initialized, it's that simple.
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @NeatWolf > I gave it a try very quickly just to be sure and it all works as intended if you flip after initialization. I think in your case it's probably the AIWalk script that's forcing the direction (apart from the fact that you're not calling Flip so it won't work anyway).
    In 3.1, you get the OnRevive method that you can override to prevent it if you want. Also useful as it separates that logic from onEnable ;)
     
  11. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    So, what's the best way to do it in my class? In the Awake or Start method? It's just a

    If (Random. value < 0.5f)
    Something.Flip ?

    Does it work with AIWalk?
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    AIWalk forces a direction OnRevive (in 3.1, in 3.0.x it's still OnEnable).
    If you're on 3.0.x, extend AIWalk to override that OnEnable.

    And then yes, it's just something like :
    if (Random.Range(0,10)%2 == 0) // or any random method of your choice
    {
    _character.Flip();
    }

    If you want to do it in your class in 3.0.x it's gonna be tricky as you'll have to somehow wait for AIWalk to have done its thing. In 3.1 you'll be able to use the OnRevive event so it can be completely separate.
     
  13. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I suppose I should use something like yield return null or something like that to wait a few frames in that case.

    I think I've lost track of which version I'm using now (Unity should really made assets work like programs: installable, uninstallable, and able to provide specific autoupdate functions, just like most browsers do).
    Ok, luckily it was on the last line of the readme. 3.0.1.

    Yup, having the OnRevive method to override would be great!

    I'll recover the CrowdWalk class extending AIWalk and give it a try.

    I think it would be handy to have an exposed overridable public method in the CharacterHorizontalMovement to Flip or set the direction manually. Or, are we supposed to rely only on caching the Character/CorgiController and using their methods for that? Waiting for a OnEnable or a OnRevive seems a bit tricky for a basic feature like facingDir/Movement flipping that may be used by other object as well. Maybe implementing a Property?
     
    AlanOToole likes this.
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @NeatWolf > The Flip method is on the Character component as you can have a flippable character that can't move horizontally (a static archer maybe?). So yes you'll need to cache the Character component (it shouldn't have much impact - if any - on performance).
    Version number can be checked on the StartScreen scene (at the bottom) and on the readme, but I agree with you it could be made easier by Unity.
    I'll think about that initial flip property, but I fear it'll make things overcomplicated for users who don't have such a complex setup (always trying to keep things as simple as possible for newcomers).
     
    AlanOToole likes this.
  15. AlanOToole

    AlanOToole

    Joined:
    Sep 7, 2013
    Posts:
    132
    You were spot on @reuno, well done :)

    For those who are interested, here is my code snippet. I extended the CharacterHorizontalMovement class and within the HandleHorizontalMovement function, I added the following:

    Code (CSharp):
    1.            
    2. // we pass the horizontal force that needs to be applied to the controller.
    3. float movementFactor = _controller.State.IsGrounded ? _controller.Parameters.SpeedAccelerationOnGround : _controller.Parameters.SpeedAccelerationInAir;
    4. float movementSpeed = _normalizedHorizontalSpeed * MovementSpeed * _controller.Parameters.SpeedFactor;
    5. float newHorizontalForce;
    6.  
    7. newHorizontalForce = Mathf.Lerp (_controller.Speed.x, movementSpeed, Time.deltaTime * movementFactor);
    8.  
    9. // Added lines for inertia sliding to a stop.
    10. newHorizontalForce = Mathf.Lerp(_controller.Speed.x, movementSpeed, Time.deltaTime * inertiaFactor);
    I hope this helps someone out!

    Thanks!
     
    reuno likes this.
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @GTsphere > You're welcome, thanks for sharing that snippet :)
     
    AlanOToole likes this.
  17. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    No, I was talking about a "for runtime use" property, so that every external script can simply Flip not only the aspect but also the movement of the Character/Controller.

    By the way, everything now behaves as needed:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using MoreMountains.CorgiEngine;
    4.  
    5. public class AIWalkRandomInitialDir : AIWalk {
    6.     protected override void OnEnable ()
    7.     {
    8.         _direction = (Random.value < 0.5f) ? Vector2.right : Vector2.left;
    9.     }
    10. }
    11.  
    Yet... I had to subclass a non related class just to obtain something that should have been handled by another class, the CrowdRandomizer.
    It works but personally don't like this approach.

    Is there a way I can do this from a class that inherits from MonoBehaviour, attached on the same GameObject?
     
    Last edited: Dec 29, 2016
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @NeatWolf > If you don't want your class to do it component based, via an ability, and don't want to use events, then no, there's no other way that I'd recommend.

    And it's not a non-related class in my opinion. You're trying to spawn objects that are designed to have a forced direction (AIWalks, that's basically all they do, walk and have a start direction). If you'd done it with any other Character without the AIWalk script, you wouldn't have had this issue. There's a Flip method, it does what it's supposed to. The AIWalk script is a super simple, self contained walker AI. I could separate it into more mini modules (AIDetectWalls, AIJustWalk, AIStartInThisDirection), or add more checkboxes in its inspector, but for the vast majority of people, it works just fine and doesn't add unnecessary levels of complexity. One of this engine's strengths is its simplicity of use. I won't turn it into an unusable mess of buttons and checkboxes.

    I'm open to suggestions here, but remember it's an engine that needs to cater not only to your needs, but also those of a lot of other people :)
     
  19. Zehru

    Zehru

    Joined:
    Jun 19, 2015
    Posts:
    84
    Hi @reuno :) and hi everyone.
    I'm having a small problem( or doubt) that maybe someone here could help me to solve or figure out.

    On the game i'm making, the main character casts projectiles from his hand.
    I created an invisible game object called "Hand" that follows the animation of his arm going to the final position, which is the moment that the arm is straight and prepared to cast the projectile.

    H0owever, when I press the shooting button, the projectile is instantiated(activated) before his hand arriving the right point (before the end of the animation).
    My question is... Is it possible to finish the animation and after that, shooting? I mean, something like a timer.
    If so, please can you help me to figure out how to do it? :)
     
  20. AlanOToole

    AlanOToole

    Joined:
    Sep 7, 2013
    Posts:
    132
    Hey @Zehru, off of the top of my head, I think using Animation Events would be perfect. You could schedule an event to happen to happen right at the end of playing an animation.

    Check out this link: https://docs.unity3d.com/Manual/animeditor-AnimationEvents.html it definitely helped me out in the past.

    If this doesn't help though, let me know!
     
    Zehru likes this.
  21. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I understand. Sure, I wasn't asking to refactor the engine, just a support extra method on the Character (or Controller) to let third party classes to be able to Flip both facing and movement of a character at the same time.

    But,
    I think I missed something in all this. You maybe suggested an alternate way to do that that leverages on the Controller/Character? Like, calling the Flip Method externally?
     
  22. Zehru

    Zehru

    Joined:
    Jun 19, 2015
    Posts:
    84
    @GTsphere Hi! I think the way you said is amazing, and looks like the best way to call soundclips on animations( like walking footsteps).
    The only problem is that I'm quite newbie at programming, and I'm not been able to find a way to stop calling the projectile when pressing a button, then just calling it in the animation event.

    I need to study more about programming. :/
    Thank you very much for your help ^^
     
    AlanOToole likes this.
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Zehru > As @GTsphere said, animation events sound like a great idea. Otherwise, you can override the Weapon class (or CharacterHandleWeapon class) to add that delay.
    @NeatWolf > "just a support extra method on the Character (or Controller) to let third party classes to be able to Flip both facing and movement of a character at the same time." > That's exactly what the Character's Flip method is for. I feel like I'm missing your point here, the Flip method does exactly that, changes the facing and movement of a character :)
     
    AlanOToole and Zehru like this.
  24. Xain

    Xain

    Joined:
    Aug 3, 2013
    Posts:
    68
    I have the same problem, I have an archer character but it's shooting before animation is finished.I'll try animation events and adding delay to weapon class.
     
    AlanOToole likes this.
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    I'll add a delay option to the weapon in the next release. It seems much more common than I thought!
     
  26. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I reverted my changes, used the AIWalk class again, called the Flip method on the characters 50% of the times, with this code:

    Code (CSharp):
    1.         cachedCharacter = GetComponentInChildren<Character>();
    2.         cachedAIWalk = GetComponentInChildren<AIWalkRandomInitialDir>();
    3.     }
    4.    
    5.     protected virtual IEnumerator Start () {
    6.         yield return null;
    7.         RandomizeCrowd();
    8.     }
    9.    
    10.     public virtual void RandomizeCrowd()
    11.     {
    12.         RandomizeScale();
    13.         RandomizeSpeed();
    14.         RandomizeColor();
    15.        
    16.         if (randomizeInitialFacingDirection)
    17.             RandomizeFacing();
    18.     }
    19.    
    20.     public virtual void    RandomizeFacing()
    21.     {
    22.         if (Random.value < 0.5f)
    23.             cachedCharacter.Flip();
    24.     }
    25.  
    ...and the crowd is totally ignoring it. They spawn in mid air with their initialFacingDirection set to Right, their in editor facing is to the right, but they actually get spawned facing left. And the Flip() method has no effect. I tried to comment and uncomment it, no changes.
    My method gets called, and debugging it the Flip method gets called 50% of the times, but with no result.

    Any ideas?
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    Well, yes... As I explained to you in great details yesterday, the AIWalk class, onEnable (in 3.0) or onRevive (in 3.1), forces the direction of the character. That's one of the only two things this class does. The other is making the character walk.
    So either you wait for the next version that implements that event (fortunately I sent that new version to you so you can even do it now if you want), and use it
    Or you follow my suggestion which is to create an ability called RandomizedDirectionAIWalk (or whatever) that extends AIWalk and overrides its initialization script and flips it.
     
  28. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I see. I appreciate the great details and effort you used in the explanation.

    The point is: even if I call the Flip method, there are no character abilities that respond to it. The only one would be CharacterHorizontalMovement, but it doesn't implement the Flip method, so the empty Flip method of the ancestor gets called.

    Is there a specific reason CharacterHorizontalMovement doesn't implement the Flip method?

    I mean, calling the Flip method of the character would be the most intuitive thing to do to make a character flip, not calling OnEnable, OnRevive, and it's easier than using events. Isn't it?
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    I'm probably explaining it all wrong because it really is very simple.

    But I'll try again (one last time because seriously this is not that hard):

    1 - there is only ONE WAY to flip a character. It's the Character's Flip method. You can call it from any ability using _character.Flip(). You can call it externally too, you get the idea. This will make it turn around (as the name implies, or as the documentation explains...).

    2 - abilities don't have to implement flip, they don't have to flip. You just call _character.Flip() and your characters turns around (with all its components).

    3 - But IN YOUR CASE you're trying to flip a character which has an AIWalk component on it. That component, as I've explained three times now, forces a direction when it starts (onEnable or onRevive). That's what it's meant to do, that's what it's supposed to do. It only does that and make the character walk. So when you spawn a character and make it flip, it DOES flip. It's just that then AIWalk initializes and forces a direction. That's why you don't see it flip.
    - So, again, either extend AIWalk to stop it from forcing a direction, or use events to do your flip at the appropriate time.

    As I've explained yesterday, yes, the AIWalk could be split into more parts, or have a special "please don't force my direction at the start" checkbox. But it'd overcomplicate things for everyone but you, so here the proposed solutions, that I've (once again) explained is the only one I have. :)

    I hope this makes things clearer for you now!

    Edit : added some bold on "forces a direction" as I think that's really the important part here.
     
    rrahim likes this.
  30. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    No need to use that tone in a support request - I can read between the lines.
    Thanks for your patience and clear explanation.

    Cheers.
     
    Last edited: Dec 30, 2016
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    What tone? There's no tone. I've added bold to make the important parts stand out. To help you. What's wrong with that?

    I'm really trying to help you every time. I've spent half of my afternoon yesterday explaining things to you.
    You've asked me countless questions now, I've always been nice and patient, and you're very often acting super aggressive, like right now.
    I'm sorry but it's really not a nice attitude you have.
     
  32. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    "I'm probably explaining it all wrong because it really is very simple.

    But I'll try again (one last time because seriously this is not that hard):

    1 - there is only ONE WAY to flip a character. It's the Character's Flip method. You can call it from any ability using _character.Flip(). You can call it externally too, you get the idea. This will make it turn around (as the name implies, or as the documentation explains...).

    2 - abilities don't have to implement flip, they don't have to flip. You just call _character.Flip() and your characters turns around (with all its components).

    3 - But IN YOUR CASE you're trying to flip a character which has an AIWalk component on it. That component, as I've explained three times now, forces a direction when it starts (onEnable or onRevive). That's what it's meant to do, that's what it's supposed to do. It only does that and make the character walk. So when you spawn a character and make it flip, it DOES flip. It's just that then AIWalk initializes and forces a direction. That's why you don't see it flip.
    - So, again, either extend AIWalk to stop it from forcing a direction, or use events to do your flip at the appropriate time.

    As I've explained yesterday, yes, the AIWalk could be split into more parts, or have a special "please don't force my direction at the start" checkbox. But it'd overcomplicate things for everyone but you, so here the proposed solutions, that I've (once again) explained is the only one I have. :)

    I hope this makes things clearer for you now!

    Edit : added some bold on "forces a direction" as I think that's really the important part here"


    This tone.
    In a common conversation those parts in bold are really not necessary and really don't help the other part in understanding the answer or in making it feel any better. They're there for a reason. Talking about attitude.

    Anyway, I'm not here to debate or to be called aggressive while I ask for support while trying to work at the same time.
    For years I haven't asked any support to anyone, even if I could. Now that I actually could use a extra hand because of an impending deadline that makes me unable to have an in-depth look into a framework documentation... this.

    But I'm probably overreacting because I'm under heavy pressure, or a bit oversensitive when people try to imply I'm dumb.
    I'm sorry, in that case.

    Cheers, and thanks for your support.
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    Well I assure you there's nothing aggressive behind my messages. You should assume positive intent here. I started my message by saying I was probably explaining it wrong, that's me saying I probably made a mistake. And yes I said I'd do it one last time, hoping it'd be enough as hopefully that problem is not too hard. I really don't get what's aggressive or unnecessary here.

    I'm absolutely not implying you're dumb, I don't understand where you get that from. I'm just explaining the solutions here so you can go on with your project, by being as explicit as I can (hence the "as I've said yesterday" or "as explained in the documentation". That's just so you know where the information is if you need it. I could have just said "go read the API documentation", like many do, but I didn't. I took time, I even coded a little scene to make sure the solution I proposed worked. Again, maybe I'm not explaining things clearly enough, or missing the point about the detail that is blocking you.

    So yes I think you're a bit overreacting. It's all fine by me, I don't hold grudges or anything, feel free to ask other questions. But please, and I think I've already told you so a few months ago, assume positive intent. I'm here to help you. And everyone else :)
     
    Stevepunk, Xain and NeatWolf like this.
  34. Xain

    Xain

    Joined:
    Aug 3, 2013
    Posts:
    68
    Hi reuno, I couldn't find anyway to make projectile fire after animation is finished.Is there any eta on update ? Or can you tell us what to do :(. I tried animation event but no luck.
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Xain > no ETA on that update, no. There's already one (v3.1) in the pipe. That delay will be in the next one. That said, it's quite easy to implement right now, you just have to extend the projectile weapon class to add a delay before the actual shooting. A simple coroutine would do the trick. That seems much easier than trying to do that with animation events in my opinion, although both are technically possible.
     
    Xain likes this.
  36. Xain

    Xain

    Joined:
    Aug 3, 2013
    Posts:
    68
    I'm not a good coder but I'll try my best :D thanks reuno
     
    reuno likes this.
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Xain (and everyone else who requested it) I've added the delay before use to weapons into the next update (3.1). I don't like adding last minute features to a release, but that one wasn't too risky.

    So good news everyone, I've just submitted v3.1 to the Asset Store. You should be able to get it as soon as Unity approves it, as usual (from 3 to 15 days for the past few releases).

    Here are the release notes :
    • Adds a complete achievements system
    • Adds a new Character Ability : Slope Angle Orientation. Now you can have your character perpendicular to the slopes it's walking on at all times. It can even orient the weapon accordingly.
    • Adds a new events system, to further improve extendability
    • Adds support for Unity 5.5
    • Adds custom 5.5 splashscreens
    • Adds new Post Processing Effects support
    • Adds delay before use to weapons
    • Adds OnRespawn delegate to the Health class (which fixes enabling/disabling AI agents repositioning)
    • Falling platforms can now benefit from the AutoRespawn component too
    • Removes all remaining garbage generation from CorgiController, now 0% footprint
    • Separates prefabs from resources for lighter builds.
    • Removes cinematic effects
    • Modularizes the LevelManager class' Start method.
    • Fixes gravity reset after climbing a ladder while wallclinging
    • Fixes projectile's invulnerability when invulnerability duration is zero
    • Fixes the Rectangle demo character's slope angle speed factor
    • Prevents autodetect moving platforms from moving when jumping onto them from underneath.
    • Prevents errors when using singletons in edit mode.
    • Prevents DamageOnTouch from triggering a collision if health is below zero
    • Fixes a bug that wouldn't detach you from a moving platform when exiting it by walking on another platform
    • Changes ObjectPooler's initialization from Start to Awake for consistency
    I hope you'll like it! Note that it requires Unity 5.5, and make sure you backup your project first! Nothing too breaking I expect this time, but I've renamed the Resources folder into Prefabs due to popular request, so this could lead to some duplicate files depending on how well Unity handles the import.
     
    Muppo, rrahim, Xain and 3 others like this.
  38. Zehru

    Zehru

    Joined:
    Jun 19, 2015
    Posts:
    84
    Wow... amazing :D
     
    reuno likes this.
  39. Xain

    Xain

    Joined:
    Aug 3, 2013
    Posts:
    68
    Looks great , Thank you reuno! :D
     
    reuno likes this.
  40. rrahim

    rrahim

    Joined:
    Nov 30, 2015
    Posts:
    206
    I think @reuno did a good job explaining this initially, as I've been following the discussion. Understand that he tried to bring some closure to the issue.
    And further more it was a very educational read, so thanks to you both.

    @NeatWolf Good luck on what you're working on (I've seen your requests in other threads as well, it sounds interesting).
     
    NeatWolf likes this.
  41. justmekino

    justmekino

    Joined:
    Oct 29, 2016
    Posts:
    13
    Hi @reuno

    Can you help me? my character somehow not affected by the slope, the speed is constant when i'm walking up or down the slope collider (platform). The speed must increase when i'm going down the slope and then speed decrease when i'm going up the slope. :(

    Any ideas how i'm not affected by slope angle? Thanks
     
  42. justmekino

    justmekino

    Joined:
    Oct 29, 2016
    Posts:
    13
    Nevermind, I just figured it out, I edited the slope angle speed factor, i don't notice it on the corgi controller. :D
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @justmekino > Most demo characters don't have their speed affected by the slope angle by default. That's something you can change via the CorgiController's inspector. There's an animation curve for it. You'll want to specify values going from -90 to 90 (degrees). The y value is the slope factor. 1 won't change anything, 0 will make you stop, 10 will make you go 10 times faster, etc.

    Edit > Good sync there!
     
  44. justmekino

    justmekino

    Joined:
    Oct 29, 2016
    Posts:
    13
    @reuno, But it seems the slope angle doesn't work on mobile android build? On desktop it's all working well.. Hmm.. Am I missing something?
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @justmekino > It works exactly the same on all target builds. Don't know what you're missing here. Maybe you didn't apply your changes or something.
     
  46. justmekino

    justmekino

    Joined:
    Oct 29, 2016
    Posts:
    13
    @reuno I'm pretty sure I've applied it bcos it's working on the desktop. And before building it, I'm 100% sure I saved it.. :( Btw, I'm using Galaxy S4 on an Android Jellybean+ build.
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @justmekino > I don't have any android device with an OS that "old" so I can't give it a proper try, but on a Nexus5 running what I think is the latest version I don't have any issue. There's nothing in the CorgiController script that does any exception if you're on mobile or not, so I'm afraid I have no idea why you'd get a different result.
     
    justmekino likes this.
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    I just sent out a newsletter to subscribers, I thought it could be of interest here too, so here goes :)

    Hello,

    First of all let me wish you a very happy new year!
    2016 has been a busy year for More Mountains, with quite a lot happening:

    I released 11 updates for the Corgi Engine, which is still in the top 10 most popular complete projects after 2 years on the Unity Asset Store. That’s all thanks to you! It’s really great to see so many people create awesome games with it, and release them on Steam or on mobile stores.

    I also released the Infinite Runner Engine in 2016, along with 4 updates throughout the year. It’s really the project I’m the most proud of. This asset can really be used for a lot of different gameplay variations. Oh and I extracted the Corgi Engine's controls into Nice Touch, a minimal and simple mobile input solution, and added a few features to it as months went by.

    And then I spent a lot of time working on future assets. I’ve just submitted the first version of the Highroad Engine to the Asset Store, so it should be available within a few days. The Highroad Engine is the easiest way to create the arcade racing game of your dreams. Whether you’re planning a solo, local or online multiplayer game, it’s got you covered, and should provide everything you need to make the next best Micro Machines like game. I'll tell you more about it when it's actually available!

    Recently I’ve been writing a lot of documentation for all these assets, it’s already online, so make sure you check it out, and let me know if you feel like something’s missing (you can find the links for these on each asset's page).

    On a more personal note, I took part to two editions of the Ludum Dare gamejam, releasing Shapeshifter Biker and Smallest Dungeon, which both scored quite well. Shapeshifter Biker even ended up on Rock Paper Shotgun’s Best Free Games of 2016 list!

    2017 is up to a great start, as January should see the Highroad Engine and Corgi Engine v3.1 hit the store. And then I’m planning on delivering at least one brand new asset, and keeping all assets updated as regularly as ever.

    I wish you all a great year, and all the best for your upcoming projects!
     
    Bhanshee00, addz92, Zehru and 3 others like this.
  49. AlanOToole

    AlanOToole

    Joined:
    Sep 7, 2013
    Posts:
    132
    @reuno you rock, thanks for sharing this!
     
    reuno likes this.
  50. Mighty183

    Mighty183

    Joined:
    Oct 19, 2016
    Posts:
    4
    Just updated to 3.1 in Unity 5.5.0f3 and I'm getting a whole bunch of errors about a struct being nullable.

    Assets/CorgiEngine/MMTools/StateMachine/StateMachine.cs(77,20): error CS0453: The type `string' must be a non-nullable value type in order to use it as type parameter `MMEvent' in the generic type or method `MoreMountains.Tools.MMEventManager.TriggerEvent<MMEvent>(MMEvent)'

    Also, I really excited to play around with the slope rotation. Keep up the awesome job!

    EDIT: Deleting the original folder first solved everything.
     
    Last edited: Jan 4, 2017