I have a problem with my characters. I find it hard to create its motion and movements. Can you suggest some ideas that can help me do it better or where can I get characters that aready has basic movements like running and walki for free
Usually using CharacterControllers is the best thing to do. You can start with the CharacterController.Move example of movement script - it’s easy to understand and modify. Just to have an idea, the script below is the example script with run and mouse control to turn left/right:
var walkSpeed : float = 6.0; var runSpeed : float = 9.0; var turnSpeed : float = 90; // speed to turn left/right var jumpSpeed : float = 8.0; var gravity : float = 10.0; private var moveDirection : Vector3 = Vector3.zero; private var angles : Vector3 = Vector3.zero; function Update() { var controller : CharacterController = GetComponent(CharacterController); // turn left/right (around Y) with mouse X angles.y = (angles.y + Input.GetAxis("Mouse X")*turnSpeed*Time.deltaTime) % 360; transform.localEulerAngles = angles; if (controller.isGrounded) { moveDirection = Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")); moveDirection = transform.TransformDirection(moveDirection); // define speed var speed = walkSpeed; // assume walkSpeed, but if shift pressed... if (Input.GetKey("left shift")) speed = runSpeed; // change to runSpeed moveDirection *= speed; if (Input.GetButton ("Jump")) { moveDirection.y = jumpSpeed; } } // Apply gravity moveDirection.y -= gravity * Time.deltaTime; // Move the controller controller.Move(moveDirection * Time.deltaTime); }