How can i adjust characterMotor parameters(js)?

I want change the characterMotor parameters (like jumping > baseHeight) from script

how can i do this?Thanks in advance!

You would need to define a variable, here I use “motor” to make it understandable. In start, you would need to define your variable. If this script is attached to your character motor, you could just use GetComponent. Then you’d type motor.“whatever you want to mod”. I named a few in the script, but it’ll be pretty easy to figure out the rest with autocomplete, and by looking at the inspector while you’re modifying. Here is my script in C#. Hope this helps :smiley:

using UnityEngine;
using System.Collections;

public class MotorTest : MonoBehaviour 
{
    CharacterMotor motor;
	
	void Start()
	{
		motor = GetComponent<CharacterMotor>();
		
		motor.jumping.baseHeight = 1.0f;
		motor.jumping.extraHeight = 2.0f;
		motor.canControl = true;
		motor.sliding.enabled = false;
		motor.useFixedUpdate = true;
	}
}