Change Log
Version 1.4.3
Character
The
_desiredVelocityfield is now marked asprotected(was previouslyprivate), allowing modification from theCalcDesiredVelocitymethod in derived classes.The methods
IsJumpAllowedandCanJumpare nowpublic, enabling access from external (non-derived) classes.
CharacterMovement
The Advanced properties are now marked as
public.
Examples
Updated FishNet example to its latest version.
Added a Third Person example for Fusion 2.
Added a Cinemachine Path Following example.
Version 1.4.2
New Distribution Versions: ECM2 is now available in two versions—one for Unity 2021+ and a native version for Unity 6, which includes support for URP, the Input System, and the latest Cinemachine version.
Removed Cinemachine Requirement: The demo scene now uses the
ThirdPersonController(non-Cinemachine based).Cinemachineexamples are still available as a separate package.Added New Input System Examples: New examples demonstrate character control in both
FirstandThirdperson views using Unity’s Input System.New useFastGeomNormalPath Option for
CharacterMovement: Added theuseFastGeomNormalPathoption, which allows theFindGeomOpposingNormalmethod to computesurfaceNormalusing a faster, though slightly less accurate, approximation.InvokeMovementModeChangedEvent in
CharacterClass: IntroducedInvokeMovementModeChangedEventto centralize theOnMovementModeChangedmethod. This allows derived classes to override it, improving modularity and flexibility.ApplyDownwardsForce Now Public: The
ApplyDownwardsForcemethod in theCharacterclass is now publicly accessible.Enhanced AddExplosionForce: Improved the
AddExplosionForcemethod for behavior more closely aligned with Unity's nativeAddExplosionForce.Updated FishNet Example: The FishNet example has been updated to its latest version.
Bug Fixes:
Platform Landing Synchronization: Resolved a slight de-synchronization in character velocity when landing on moving platforms. The issue, influenced by ground friction and falling lateral friction, was due to execution order, where character velocity was adjusted by movement mode before platform velocity was applied.
Photon Fusion 2 Initialization: Fixed an issue in Photon Fusion 2 examples where
NetworkDatawas sometimes not initialized under specific conditions.
Version 1.4.1
Added networking examples for the latest versions of Fusion, FishNet, Mirror, and NetCode.
Added Input system example.
Updated swimming example. This demonstrates the implementation of a jump out of water.
Minor bug fixes and improvements.
Version 1.4.0
This version is a complete package revision; as such, there are some significant changes that may affect compatibility with previous versions.
It is recommended to import it into a clean project before applying the update in your main environment.
Important note on package dependencies
ECM2 does not require any external package, however its Demos and Examples requires Cinemachine package to work.
Please make sure to install the Cinemachine package into your project when importing demos and examples.
General
The entire package now resides under the
ECM2namespace.
Character Movement
The
CollisionBehaviorenum has been renamed toCollisionBehaviourto align with Unity's nomenclature and now uses the [Flags] attribute.The callback associated with
CollisionBehaviorhas been renamed toCollisionBehaviourCallbackto match Unity's nomenclature.The
DepenetrationBehaviorenum has been renamed toDepenetrationBehaviourto align with Unity's nomenclature, and it now uses the [Flags] attribute.All fields have been corrected to reflect the 'behaviour' changes.
The
IComparerinterface has been removed as it was causing runtime allocations.The use of
Array.Sort(which caused runtime allocations) has been replaced with a custom implementation (insertion sort).The
Statestruct, along with theGetStateandSetStatemethods, has been removed.Collision and overlap limits (
kMaxCollisionCountandkMaxOverlapCount) have been increased to 16 (previously 8).The
Velocityproperty is now a ref.The current plane constraint normal is exposed through the
GetPlaneConstraintNormal()method.The
SetPlatformmethod has been renamed toAttachTo.Fixed an issue with
ImpartPlatformRotationcausing incorrect rotation when upside down.Minor bug fixes and improvements.
Mesh Utility
Resolved a bug causing reversed normals in certain mesh instances.
Slope Limit Behaviour
Renamed the
SlopeLimitBehaviourcomponent and its associated fields toSlopeLimitBehaviorto align with Unity's naming conventions.
Character
The Character class has undergone a complete refactoring (breaking changes). Among its new features, it now supports extension through composition.
Input Code Removal: All input-related code has been removed for a streamlined codebase.
Sprint and Related Fields: The
Sprintand related fields have been removed and are now available as examples.Jump Refactor: The
Jumpfunctionality has been completely refactored. The original jump can be found in examples as an ability.MovementMode and RotationMode Enums:
Enums(MovementModeandRotationMode) are now part of theCharacterclass. Example usage:Character.MovementMode.Walking,Character.RotationMode.OrientRotationToMovement.deltaTime Property Removal: The
deltaTimeproperty has been removed and is now a parameter for functions requiring it.Method Name Changes: Movement mode-related methods have been renamed for clarity (e.g.
WalkingtoWalkingMovementMode,FallingtoFallingMovementMode, etc).Move Method Removal: The
Movemethod has been removed.Simulation Method Refactor: The
Simulationmethod has been refactored and split into inner methods and events for increased flexibility.Character Class Removals:
FirstPersonCharacterhas been removed and is now available as an example.ThirdPersonCharacterhas been removed and is now available as an example.AgentCharacterclass has been replaced by the newNavMeshCharactercomponent, an extension addingNavMeshbased navigation capabilities.
For more details, please refer to the updated documentation.
Last updated