Does anyone know how to get rid of velocity/acceleration with the FPS controller?
There is no velocity in the FPS controller. Velocity is stored/used in the CharacterMotor script. So the first step is to get a reference to this script:
var charMotor = GetComponent(CharacterMotor);
Now to set velocity you can use the SetVelocity() function in the charMotor:
charMotor.SetVelocity(Vector3.zero);
But there is one gotcha here. Open up the CharacterMotor script. Find the SetVelocity() function. You will find this line in that function:
SendMessage("OnExternalVelocity");
Unless you have this function in some script that has this function on this game object, this line will generate an error. Your choices are:
- Comment out this line
- Put a function to receive this message in some script on this game object
- Add a 'SendMessageOptions.DontRequireReciever as the second parameter to this SendMessage() call.