Adding force to character on CharacterMotor

Basically since im using the PlatformInputController i dont wanna use a rigidbody otherwise t’ll mess up the physics so im wondering how would i go about adding force to the my character towards a certain direction. Im trying to understand how the CharacterMotor.js works but dont understand it that much.

(trying to do a wall jump btw, i want to add force to the oppsite direction to the wall im facing)

This may help, but I’m not sure if it would accomplish what you needed. One of the functions of the CharacterMotor.js is SetVelocity. You can change this by passing it a variable.

The function in the CharacterMotor.js…

function SetVelocity (velocity : Vector3) {
	grounded = false;
	movement.velocity = velocity;
	movement.frameVelocity = Vector3.zero;
	SendMessage("OnExternalVelocity", SendMessageOptions.DontRequireReceiver);
}

A script I use to respawn a player which passing a varaible to the function above.

function playerRespawn ()
{
    // Variable : ScriptName
	var setVelocity : CharacterMotor;
    // Sets a velocity, this would be not moving at all.
	var myNewVelocity = Vector3(0,0,0);
    
    // Gets the script that is attached to the same object. 
	setVelocity = gameObject.GetComponent("CharacterMotor");
    // Passes in the new velocity
	setVelocity.SetVelocity(myNewVelocity);

    // Moves the player to the spawn point.

You probably wont need this part

    transform.position = Vector3(256,5,256);
	
	
}

This works for what I needed, you might want to check the api for GetComponent.