Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. 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] Easy Character Movement

Discussion in 'Assets and Asset Store' started by Krull, Apr 21, 2016.

  1. Wraix

    Wraix

    Joined:
    Oct 2, 2012
    Posts:
    2
    Hi

    I am a new user of ECM and pretty happy with it so far. I have a small issue with my character jump that i cannot figure out if it’s an animation problem or something i need to set or change in ECM.

    I am using a controller which inherits from base character controller with root motion and root rotation motion enabled.

    When i jump the character and it is facing world z = 1 the jump happens ok, but if i turn in any direction and jump, the jump rotates the character towards world z = 1. Any pointers to what i am doing wrong or what is going on? Any help would be appreciated.

    Kind Regards
    Marc
     
  2. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @Wraix,

    A few things to consider while using root motion.

    First when an ECM character uses root motion, the animation velocity and animation rotation is directly fed to the Character Move method and character rotation, unlike the 'normal' movement which accelerates / decelerates towards its given desired velocity.

    So in order to jump using root motion, your jump animation should give the correct velocity as this will be directly used to move the character.

    Secondly, by default an ECM character disables root motion when the character is un-grounded, to avoid the above issue, as the included example jump animations does not include root motion support. In order to use root motion during your jump, you'll need to modify the BaseCharacterController Move method, and replace its last line:

    Code (csharp):
    1. applyRootMotion = useRootMotion && movement.isGrounded;
    to

    Code (csharp):
    1. applyRootMotion = useRootMotion;
    Last but not the least, depending on your animations, you will need to transform the moveDirection vector before fed it to your animator, for example, with the included Ethan character, its animations expect it to be in local space, as you can see in the Animate method of the Ethan character controller.

    Hope this helps you, however if you need any further assistance, please let me know.

    Kind regards,
    Krull
     
  3. Wraix

    Wraix

    Joined:
    Oct 2, 2012
    Posts:
    2
    Hi Krull

    Thank you so much for the reply it helped me figure out what was wrong. Turns out that i have a similar setup to your Ethan example, so the root motion on the jump is not there and movement can be done in local space.

    My problem was that movement needed to be relative to the player follow camera.

    Code (CSharp):
    1. moveDirection = moveDirection.relativeTo(playerCamera);
    Thanks for the help!

    Kind Regards,
    Marc
     
  4. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @Wraix,

    Thats great! I am glad I was able to help.

    Best regards,
    Krull
     
  5. TPEUnity

    TPEUnity

    Joined:
    Jan 17, 2018
    Posts:
    26
    Is it possible to add support to properly use Animator.MatchTarget(); function? While it works when i set target speed to be the magnitude of animator velocity and increasing max lateral speed to something high enough it occasionally overshoots quite a bit, especially when velocity is high.
     
  6. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @TPEUnity

    While not really familiar with the match target feature, I think your best option when using it, its let it take full control of your character pausing the ECM character, when a ECM character is paused, it will turn the ECM character into Kinematic and allows the MatchTarget move the character without being 'interfered' by the default ECM movement.

    You can handle it depending on your character's current state, for example if walking uses regular movement, then if your character is 'climbing' pause it and let MatchTarget move it.

    Regards,
    Krull
     
  7. sarahlikespie

    sarahlikespie

    Joined:
    Apr 26, 2020
    Posts:
    2
    Hi

    Great asset so far. As a new user I had a question. I am applying force to an ECM agent using navmesh but after applying force, the pathing and rotation of the agent seem disturbed and it has trouble rotating and following the correct navmesh path as it did before applying the force, as tf the offset from the force is not taken into account. This despite SyncAgent, I also testing adjust the moveDirection to match the force but this does not help also using ForceMode.impulse.

    Code (CSharp):
    1.  
    2. if (m_navMeshAgent.isOnNavMesh)
    3.                 {
    4.                     m_navMeshAgent.enabled = false;
    5.                 }
    6.  
    7.                 m_controller.movement.DisableGroundDetection();
    8.                 m_controller.movement.ApplyForce(randomDirection, ForceMode.Force);
    9.  
    10.                 if (m_navMeshAgent.isOnNavMesh)
    11.                 {
    12.                     m_navMeshAgent.enabled = true;
    13.                 }
    14.  
    15.                 m_controller.movement.EnableGroundDetection();
    16.  
    Root motion is not enabled. In Update I am calling

    Code (CSharp):
    1.  
    2. RotateTowards(moveDirection);
    3.  
    In order to match direction.

    EDIT. in fact using
    Code (CSharp):
    1.  
    2. m_controller.movement.DisableGrounding(2.0f);
    3.  
    Seems to h ave solved it. Was enabling ground mid force the issue?
     
    Last edited: Jan 21, 2021
  8. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hello @sarahlikespie

    I think your issue could be related of how ECM works, I mean, at great sight an ECM character basically it will accelerate / decelerate its current velocity (including external forces) towards the given desiredVelocity (Returned by CalcDesiredVelocity method), however, so your given impulse will be affected by Character's current settings (eg: friction, acceleration, deceleration, etc).

    Another point to take into consideration, is to apply the force (ForceMode.Force) inside FixedUpdate or Move method (called in a FixedUpdate) as this force, however if you are just applying an impulse (an instant change in velocity), you can safely do in Update method.

    Your current solution basically works, because when ground is disabled (in your case by 2 seconds), the character will be not affected by its 'ground' settings (eg: friction, acceleration, etc), so your force/ impulse will be applied without any modification.

    As you can see here, your solution is one of the ways I suggest to perform a dodge / dash movement, so it should not cause any troubles.

    Let me know if I can help you any further.

    Regards,
    Krull
     
  9. sarahlikespie

    sarahlikespie

    Joined:
    Apr 26, 2020
    Posts:
    2
    Hi Krull

    Thanks for your assistance.

    I have another question if I may. I am following up about your answer earlier about applying faux gravity with characters running around spheres like mario galaxy.

    I have succeeded in this so far, using the provided walkthrough to rotate the character normal up:

    Code (CSharp):
    1. Vector3 smoothedNormal = Vector3.Slerp(characterUp, surfaceNormal, 10.0f * Time.deltaTime);
    2.  
    3. movement.rotation = Quaternion.FromToRotation(characterUp, smoothedNormal) * movement.rotation;
    In addition I am updating the gravity vector to point towards planet centre in Update()

    Code (CSharp):
    1. movement.gravity = ((transform.position - planet.position).normalized) * gravity;
    This works well and initially I thought my work was done, however I am having exceptional difficulty making the character walk beyond the equator as the moveDirection vector seems unable to move the character vertically down (-Y) as a forward motion and the character will rotate back around and never enter the southern hemisphere.

    I am using a 3rd person camera type set up and so the character needs to move relative to camera so I also apply as suggested:

    Code (CSharp):
    1. // Here we use the included extension .relativeTo...
    2.                 if (m_camera != null)
    3.                     moveDirection = moveDirection.relativeTo(m_camera.transform);
    Initially movement (no root motion) was taken care of simply like this, as per walkthrough:

    Code (CSharp):
    1. moveDirection = (new Vector3
    2.                 {
    3.                     x = Input.GetAxisRaw("Horizontal"),
    4.                     y = 0.0f,
    5.                     z = Input.GetAxisRaw("Vertical"),
    6.                 });
    This will not work and i thought the issue was the directin vector is not taking into account the slopes at the equator. With the camera at this point behind the player and looking down (-y) I reasoned making the direction relative to the camera forward vector should solve it so I tried this instead:

    Code (CSharp):
    1.  var cameraForward = m_camera.transform.forward;
    2.                 var cameraForwardHorizontal = new Vector3(cameraForward.x, 0, cameraForward.z);
    3.                 moveDirection = m_verticalInput * cameraForwardHorizontal + m_horizontalInput * m_camera.transform.right;
    However the same behaviour, a movement vector that is no longer on a normal flat plane is not tolerated, even when not applying the camera relativeTo apporach. Do you have any suggestions?

    I feel it is related to the moveDirection needing to be a world space vector somehow?
     
  10. Amo-deus

    Amo-deus

    Joined:
    Jul 27, 2015
    Posts:
    9
    Hi again! I'm having some issues with creating "Bounce Pads" When my character enters the bouncing trigger or collider and I press jump at the same time it cancels out the bounce pad force. Also because I use a double jump if I hold the jump button while hitting the bounce pad I get a jump immediately after leaving the bounce pad trigger. What I want to do is if I'm on a Bounce pad for that split second I cant jump or double jump because they either add extra force or cancel out the bounce pads force.
     
  11. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @sarahlikespie

    Yes I was able to reproduce this issue in the example scene, I will perform some tests (time permits) in order to better track the current issue, so please bear with me on this.

    By other hand, while the given moveDirection vector is in world space,and the example just shows it axis aligned, it can be any direction you like, for example an Agent will set it as its desired movement direction.

    Internally (CalcDesiredVelocity method) will use this give moveDirection vector to compute our desired velocity (basically just moveDirection * speed), then this desired velocity is feed to the CharacterMovement Move method to perform the desired movement.

    This Move method (CharacterMovement component) ECM will align this desired velocity vector along its current surface so the calculations are performed on the surface plane.

    In the meantime, let me know if I can help you.

    Regards,
    Krull
     
  12. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hello @Amo-deus

    This is caused because by default the BaseCharacterController Jump method, use the ApplyVerticalImpulse method to perform the jump, this method overrides the vertical velocity so it will cut your jump impulse.

    To solve this, we need tol replace the ApplyVerticalImpulse with the following function.

    Code (csharp):
    1. /// <summary>
    2. /// Determines the Character's velocity to perform the requested jump.
    3. /// </summary>
    4.  
    5. protected virtual Vector3 CalcJumpVelocity()
    6. {
    7.     Vector3 velocity = movement.velocity;
    8.  
    9.     Vector3 upVector = transform.up;
    10.     return Vector3.ProjectOnPlane(velocity, upVector) + upVector * Mathf.Max(Vector3.Dot(velocity, upVector), jumpImpulse);
    11. }
    In the CharacterMovement Jump Method, replace the ApplyVerticalImpulse (line 612) with the following code:

    Code (csharp):
    1.  
    2. // Apply jump impulse
    3.  
    4. //movement.ApplyVerticalImpulse(jumpImpulse);
    5.  
    6. movement.velocity = CalcJumpVelocity();
    7.  
    This should solve your current issue, however if have further questions, please let me know.

    Regards,
    Krull
     
  13. Amo-deus

    Amo-deus

    Joined:
    Jul 27, 2015
    Posts:
    9
    Thanks! That solved the issue of cancelling out the jump. But if I hit the bounce pad while holding down the jump button, as soon as I leave the trigger my character immediately goes into a double jump instead of having to push the jump button again after leaving the bounce pad. I added a timer and a bool to disable my double jump temporarily for a split second, but as long as I'm holding the jump button it still just activates the double jump once the timer and bool turn off. What I need to do is just completely cancel the double jump if I'm holding the jump button down while hitting the bounce pad and then reset it so that I have to release the button and press it again, if that makes sense. I think its because as long as you hold the jump button down, its trying to perform the midair jump method as soon as the requirements are met because the function is based on getButton and not getButtonDown. It works if I change:

    jump = Input.GetButton("Jump");
    to: jump = Input.GetButtonDown("Jump");

    but then the variable jump height calculation is lost.
     
    Last edited: Jan 30, 2021
  14. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @Amo-deus

    I think your current issue could be caused by the bouncer code, in there you should override the character's vertical velocity so the Character's jump adds on top of the velocity given by your bouncer.

    I tested the following, jump on bouncer while holding the jump button, the character is bounced and in order to perform the second (min air jump), I need to release and press the jump button again.

    Here is the Bouncer code:

    Code (csharp):
    1.  
    2. public class Bouncer : MonoBehaviour
    3. {
    4.     public float bounceImpulse = 20.0f;
    5.  
    6.     private void OnTriggerEnter(Collider other)
    7.     {
    8.         BaseCharacterController characterController = other.GetComponent<BaseCharacterController>();
    9.         if (characterController == null)
    10.             return;
    11.  
    12.         // Temporary pause grounding to allow the character leave the ground
    13.  
    14.         characterController.movement.DisableGrounding();
    15.  
    16.         // Apply a bounce impulse, preserving character's lateral velocity and overrides its vertical velocity with bounce impulse
    17.  
    18.         Vector3 characterVelocity = characterController.movement.velocity;
    19.  
    20.         Vector3 characterUp = transform.up;
    21.         Vector3 characterLateralVelocity = Vector3.ProjectOnPlane(characterVelocity, characterUp);
    22.  
    23.         characterController.movement.velocity = characterLateralVelocity + characterUp * bounceImpulse;
    24.     }
    25. }
    26.  
    Yes, this is expected, as the current jump property performs internal logics, so it requires to be polled, eg: Input.GetButton("Jump");

    Worth note, the character's wont reset its mid jump counter until it becomes grounded again.

    Regards,
    Krull
     
  15. Amo-deus

    Amo-deus

    Joined:
    Jul 27, 2015
    Posts:
    9
    Thanks for the reply!
    Unfortunately this only seems like a partial solution to my problem, mostly I'm just bad at explaining the situation I think haha. The character definitely needs to be able to continue double jumping after hitting the Bouncer again though. It's the first jump that needed to be added and then the double jump. For example: jump on bounce pad (treat it like normal ground) but if player jumps then add that force to the bounce, then be able to regular double jump when in air after. BUT if I hit the bounce pad and don't jump at the same time still add the regular bounce force, then while in the air be able to regular double jump. If I'm making any sense. But luckily I've gotten the problem figured out now! Thank you for the help it's much appreciated.
     
    Krull likes this.
  16. larry2013z

    larry2013z

    Joined:
    Apr 14, 2020
    Posts:
    11
    Hi @Krull,

    I was wondering if you could give us an update how Version 2 is coming along? Do you have an ETA?
     
    Shiro_Rin likes this.
  17. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @larry2013z,

    I have planned to release it this month, so hopefully 2-3 weeks before it to be available on the store :D

    Regards,
    Krull
     
    Shiro_Rin and larry2013z like this.
  18. Shiro_Rin

    Shiro_Rin

    Joined:
    Jun 24, 2014
    Posts:
    327
    Honestly that was a lot quicker than I thought! Do you have any feature lists available to read?
     
  19. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @Shiro_Rin

    While not exactly a list of features, as I am still working on docs and release materials, you can expect ECM2 to include all the features of ECM and more.

    ECM2 adds a higher level layer while ECM is a more 'to the metal' version. As previously commented ECM2 is a completely new product, for example in ECM2 a ECM2_Character requires a CharacterMovement component and the new Character class, this replaces the previous BaseCharacterController class.

    In ECM2 the CharacterMovement component (as in ECM) is the responsible of perform the Character movement (eg: move from point A to point B), however this now implements a much more robust 'collide and slide' algorithm capable of 'look ahead' and resolve collision before it actually happened offering a lot of flexibility.

    In ECM2 while the CharacterMovement is the responsible of perform all the 'geometric' work it delegates the Character to decide how to move, so now a user have full control of the Character's velocity directly from the Character's class, for example, you can modify its default friction based movement (greatly improved to btw ;) ) simply overriding the Character's CalcVelocity method.

    In previous ECM, users had to extend the BaseCharacterController, in order to replace the input, rotations, etc, however in ECM2 this is not obligatory! as the Character class is a robust and fully capable class by itself and makes use of the new Input System, so you can simply take full control of a Character using an external class (eg: PlayerController) without the need to modify the ECM2 Character at all.

    This new Character class includes a lot of functionality and now as part of this high level layer, now includes 'Movement modes' as it suggests this basically tells the Character how it should move through the world, this movement modes includes: Walking (for grounded movement), Falling (air movement affected by gravity), Swimming (Swimming through a fluid volume, under the effects of gravity and buoyancy) Flying (flying, ignoring the effects of gravity), custom movement modes etc.

    So basically now you will extend the Character class only if you decide to add custom functionality on top of it, for example implement game specific mechanics, like dash, climb, slide, etc.

    Last but not the least, here I attach a couple of pics of the new CharacterMovement and Character components so you get a better look at its included features.

    Regards,
    Krull

    Captura de pantalla (38).png Captura de pantalla (49).png
     

    Attached Files:

  20. seoyeon222222

    seoyeon222222

    Joined:
    Nov 18, 2020
    Posts:
    2
    I'm looking for a character controller asset to purchase.
    According to the article here, it seems that the new version of the asset will be released this month, so would it be better to buy the current asset, learn how to use it, and buy a new one? Or should i expect documents and tutorials to match the release of the new asset?
     
  21. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @seoyeon222222

    Thank you for your interest in ECM!

    About your question, the new version as commented above is a different product and is not a direct upgrade from current to new version (ECM2), as while they share the same goals of an easy to use and easy to extend, differences exists, however I think if you are familiar with current ECM version, should have no troubles at all using ECM2, as IMO it is easier to use.

    Having said that, yes, ECM2 will include over 30 examples ranging, from input (new input system), animation related, root motion, platforms, gameplay (eg: dash, slide, wall grab, fly, swimm, bouncers, etc), cinemachine (first person, third person, path following, etc), Bolt visual scripting, etc.

    So existing users and new users should not have issues getting most of it ASAP.

    Regards,
    Oscar
     
    Amo-deus, seoyeon222222 and Shiro_Rin like this.
  22. mookfasa

    mookfasa

    Joined:
    Dec 21, 2016
    Posts:
    18

    Sounds awesome, cannot wait to try! Will the ECM2 have ledge grabbing?
     
  23. MaximilianWinter42

    MaximilianWinter42

    Joined:
    Jan 29, 2021
    Posts:
    2
    Hello, I wanted to ask how I can adjust the movment direction, so that it point into the direction the camera is facing?
     
  24. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @MaximilianWinter42

    You can use the included extension .relativeTo (ECM.Common namespace) to transform your moveDirection vector, for example:

    Code (csharp):
    1.  
    2. // Transform the given moveDirection to be relative to the main camera's view direction.
    3. // Here we use the included extension .relativeTo...
    4.  
    5. var mainCamera = Camera.main;
    6. if (mainCamera != null)
    7.   moveDirection = moveDirection.relativeTo(mainCamera.transform);
    8.  
    For a working example, I suggest you take a look at the walk through guide example #3 Movement relative to camera.

    Regards,
    Krull
     
  25. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @mookfasa

    Thank you for your interest in ECM2, unfortunately it will not include a ledge grabbing mechanic out of the box, as the goal (like ECM) is to offer a robust general purpose where users can build their game mechanics on top of it.

    Having said that, I have planned to release a few game specific mechanics add-ons for it.

    Regards,
    Oscar
     
    Shiro_Rin likes this.
  26. MaximilianWinter42

    MaximilianWinter42

    Joined:
    Jan 29, 2021
    Posts:
    2
    Hi @Krull

    Thank you for the quick reply. I already use relativeTo to make the movedirection relative to my camera, but I also want to turn the character automaticly to face the direction the camera is viewing. I took the code from one of your example controllers and added a RotateTowards, but this is giving me a constant forward motion. I want the character to play the turn animation so I editet the move direction instead of movment rotation.

    Code (CSharp):
    1.             float singleStep = speed * Time.deltaTime;
    2.             moveDirection = moveDirection.relativeTo(playerCamera);
    3.             moveDirection = Vector3.RotateTowards(moveDirection, playerCamera.forward, singleStep, 1.0f);
     
    Last edited: Feb 19, 2021
  27. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @MaximilianWinter42,

    An ECM character by default will rotate towards your given movement direction (moveDirection property), so in your case, you should remove your last line (moveDirection = Vector3.RotateTowards(moveDirection, playerCamera.forward, singleStep, 1.0f); as we already have transformed the movement direction.

    In the UpdateRotation method, the character will rotate towards its current moveDirection vector at your current BaseCharacterController angularSpeed rate.

    However if you would like to use root motion to drive your character's rotation, you should enable the useRootMotion and rootMotionRotation.

    I suggest you following the example character controller (in examples folder) to see a working example of a controlled character.

    Regards,
    Krull
     
  28. Iainduthie

    Iainduthie

    Joined:
    Oct 30, 2013
    Posts:
    3
    I posted about this earlier but forgot to post again.

    Found out how to do crouching as a toggle in a super easy way or its horrible and i am bad at programming haha

    In the HandleInput method bit

    crouch = Input.GetKeyDown(KeyCode.C) || Input.GetKeyDown(KeyCode.LeftControl) ? !crouch : crouch;

    Then it will be a toggle.
     
    Krull likes this.
  29. seoyeon222222

    seoyeon222222

    Joined:
    Nov 18, 2020
    Posts:
    2
    Can i expect ECM2 to be released within February?
     
  30. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @seoyeon222222,

    Unfortunately no, having said that I have a release date set for next Monday 8 March.

    Regards,
    Krull
     
    seoyeon222222 likes this.
  31. baumxyz

    baumxyz

    Joined:
    Mar 31, 2017
    Posts:
    48
    Sorry for spamming your thread, but ECM2? Cooooooooool :D Can't wait!
     
    Krull likes this.
  32. taoleaf

    taoleaf

    Joined:
    Jul 15, 2020
    Posts:
    15
    Hey @Krull ,

    I'm thinking of getting ECM and integrating it into an existing project with another asset that handles input, animation and movement. That asset uses Unity's built-in CharacterController class, but all calls to its Move() method are limited to a couple scripts. Reading through the ECM docs it sounds like there may be an equivalent Move() method I can call on ECM's CharacterController. I'm trying to determine if I'd be able to keep all my animation and input code, and make modifications to call ECM's Move() method instead of the built in charactercontroller's move(). What arguments does ECM's Move() method take?

    Thank you.
     
  33. Krull

    Krull

    Joined:
    Oct 31, 2014
    Posts:
    187
    Hi @taoleaf

    Well while ECM includes a Move method and a similar methodology to unity CC, its not a direct replacement, as an ECM character being a Rigidbody based controlled is moved by velocity, at great sight it will accelerate / decelerate the Rigidbody velocity to match our given desired velocity.

    ECM includes 2 move methods, one for instant (no accelerations) velocity change and mostly used by root motion and a second one who use friction, acceleration etc. to move the character, this is the one used when not using root motion.

    This is the signature of each Move method:

    Code (csharp):
    1.  
    2. /// <summary>
    3. /// Performs character's movement. Causes an instant velocity change to the rigidbody, ignoring its mass.
    4. /// If useGravity == true will apply custom gravity.
    5. ///
    6. /// Must be called in FixedUpdate.
    7. ///
    8. /// </summary>
    9. /// <param name="desiredVelocity">Target velocity vector.</param>
    10. /// <param name="maxDesiredSpeed">Target desired speed.</param>
    11. /// <param name="onlyLateral">Should velocity along the y-axis be ignored?</param>
    12.  
    13. public void Move(Vector3 desiredVelocity, float maxDesiredSpeed, bool onlyLateral = true)
    14.  
    15.  
    16. /// <summary>
    17. /// Perform character's movement.
    18. /// If useGravity == true will apply custom gravity.
    19. ///
    20. /// Must be called in FixedUpdate.
    21. ///
    22. /// </summary>
    23. /// <param name="desiredVelocity">Target velocity vector.</param>
    24. /// <param name="maxDesiredSpeed">Target desired speed.</param>
    25. /// <param name="acceleration">The rate of change of velocity.</param>
    26. /// <param name="deceleration">The rate at which the character's slows down.</param>
    27. /// <param name="friction">Friction coefficient to be applied when moving.</param>
    28. /// <param name="brakingFriction">Friction coefficient to be applied when braking.</param>
    29. /// <param name="onlyLateral">Should velocity along the y-axis be ignored?</param>
    30.  
    31. public void Move(Vector3 desiredVelocity, float maxDesiredSpeed, float acceleration, float deceleration,
    32.   float friction, float brakingFriction, bool onlyLateral = true)
    33.  
    34.  
    You should be able to port your character's movement to ECM retaining your input code animations, etc, however as stated above is not a direct replacement and should require some time getting familiar with ECM in general.

    Regards,
    Krull
     
    taoleaf likes this.
  34. devorenge

    devorenge

    Joined:
    Jan 26, 2020
    Posts:
    1
    I'm trying to apply a physic material to a platform to make something like Ice that the player can slide on. It doesn't seem to be working, is this possible with this asset?
     
unityunity