Ghange the code of the character controller in 3d platformer game kit
Hello I bought one 3d platformer game kit from the Unity Assets store, and I want to change the character controller a little bit. Now the character can only jump above the enemies and kill them in this way. I want the character to kill the enemies by the sword. The problem is that I can not understand which script is exactly the character controller. I found one script that is called "Character motor". I can not found in it the command: moveDirection = (transform.forward Input.GetAxis("Vertical")) + (transform.right Input.GetAxis("Horizontal")); moveDirection = moveDirection.normalized * moveSpeed;
From some tutorials I know these commands are for moving the character in the horizontal plane.
Instead of it, I found in "CharacterMotor" script these rows:
public class MovementSettings { public float movementSpeed = 8f; //The speed the character moves around. public Vector3 movementDirection = Vector3.zero; //This variable is used to input the direction the character will move. [Range(0, 1)] public float groundedVelocityInfluence = 1f; //Velocity influence changes the strength of the force and how quickly it will affect the current movement. [Range(0, 1)] public float airVelocityInfluence = 0.5f; //Grounded and Air allows for different movement influence depending on the state of the character. public bool sliding = false; //Variable is used to define if the character is currently sliding. public float slideLimit = 35f; //Angle limit of the ground to decide when the character is considered sliding. public float slideForce = 5000f; //Strength of the slide. public string slideTag = "Slide"; //Force sliding state by using this tag on the terrain. public bool velocityMovement = false; //This variable is used to allow velocity take full control of the character when nothing is being pressed.
Is this the usual character controller, and must I put here the commands for the sword?