AddForce is inconsistent

i want my player to slide down a slope fast enough to land on the other platform.

15152-img.jpg

Problems:

  1. I tried using addForce and also changed the velocity of x directly but they don’t always give me the same result every single time. The player would land in different places.

    var shootDirection : String;
    var force : int = 10000;

     function OnTriggerEnter (col:Collider) 
     {
     	if( col.tag=="Player" )
     	{
     		if( shootDirection=="left" )
     		{	
     			Global_Cache.playerTransform.rigidbody.AddForce(Vector3(-force, 0, 0));		
     		}
     		else if( shootDirection=="right" )
     		{
     			Global_Cache.playerTransform.rigidbody.AddForce(Vector3(force, 0, 0));		
     		}
     	}
     }
    
  2. And also, when the player moves i adjust the x velocity to 5 or -5, but when he slides down i want this velocity to work accordingly to the force of the slide. What happens now is if i hold down the left arrow button the force is ignored and player walks instead of being shot across the slope.

I have been having the same sort of issue, I just looked it up there a re a few posts about it. Apparently Addforce is inconsistent because AddForce is affected by the rigidbody mass, the previous velocity and the time during which the force is applied. So you can either 0 out the velocity 1st of just set the velocity manually.