I have a third person character witha character controller. In the C# Player script I set the move direction like this which works pretty nice to simulate gravity
private Vector3 _moveDirection = Vector3.zero;
private float Gravity = 20.0f;
void Update()
{
// ....
_moveDirection.y -= Gravity * Time.deltaTime;
_characterController.Move(_moveDirection * Time.deltaTime + mExternalMovement);
}
The mExternalMovement (also Vector3) I set when the player is on a platform that moves. This works as well for platforms the move e.g. from left to right. But when I use the same for platforms that move up and down the player is like trembling- because of the gravity that is always set for the y movement.
But I have to set the gravity as well when standing on the platform.... any ideas?