surface effector doesn´t seem to be affecting the robot controller

i found this post
https://forum.unity.com/threads/standard-unity-2d-character-script-not-working-with-surface-effector-2d.441527/

An doing the change suggested seem to work... 

Change 1 to 2 in the PlataformerCharacter2D.cs  

1) m_Rigidbody2D.velocity = new Vector2(move*m_MaxSpeed, m_Rigidbody2D.velocity.y);
2) m_Rigidbody2D.AddForce(move * m_MaxSpeed * Vector2.right, ForceMode2D.Impulse);

BUT the controller stops working fine for movement, since the speed keeps increasing 

what would be the proper change? 



  • Jonathan Gonzalez(jgonzalez) replied

    The second method can work, but you need to tweak the speed settings of the controller and possibly the mass/drag of the rigidbody in order to get something similar as up above. I don't have a lot of experience working with 2D Controllers so it's something you'll need to test out to determine what works best for your characters.