Ultimate Character Controller WIP

Justin

Administrator
Staff member
#1
Starting a thread for new Ultimate Character Controller updates. To get things going, in version 2.1 a new gravity zone component has been created allowing your character to change gravity dynamically instead of just based on the surface normal. In this example a gravity zone has been added to two planets so the character can jump between them.

 

Justin

Administrator
Staff member
#2
In version 2.1 you'll be able to set custom scales on your character's transform. While this seems like a standard Unity feature it has to specifically be added when the controller is doing all of the collision detection.

 

Justin

Administrator
Staff member
#3
One of the improvements for the melee system in 2.1 is the ability to have input combos start a particular attack. For example, you may only want to play a heavy slashing animation when the player performs a series of inputs such as down, right, down. Or you may want to play a special counter attack after the enemy got a hit on you. These situations can now be accomplished the the Ability Starter.

The Ability Starter is an abstract class that allows you to decide when the ability should start. It can be thought of as being similar to Ability.CanStartAbility with an Automatic start type, except it's generic so you don't have to code the conditions within a specific ability. A new start type of Custom has been created, and when it is set to custom you can select a class that inherits the AbilityStarter class. In version 2.1 we will be shipping an AbilityStarter that will start the ability after an input combo has been performed:

ComboTimeout.PNG

With the above setup the ability will start after the Action, Action, Crouch inputs have been detected with Button Down. If Combo 2 or Combo 3 is not detected within 0.2 seconds from the previous input then the combo will restart. This class is just an example, but the AbilityStarter API gives you full control over when you can start your ability:

C#:
        /// <summary>
        /// Can the starter start the ability?
        /// </summary>
        /// <param name="playerInput">A reference to the input component.</param>
        /// <returns>True if the starter can start the ability.</returns>
        public abstract bool CanInputStartAbility(PlayerInput playerInput);

        /// <summary>
        /// The ability has started.
        /// </summary>
        public virtual void AbilityStarted() { }

        /// <summary>
        /// The ability has stopped running.
        /// </summary>
        public virtual void AbilityStopped() { }

        /// <summary>
        /// The object has been destroyed.
        /// </summary>
        public virtual void OnDestroy() { }
 
Top