Hi, I am creating a game, and I have made the walk:
1 .- How do I move forward to corde of animation?
2 .- How do I add or remove FPS in unity?
Thank you.
Hi, I am creating a game, and I have made the walk:
1 .- How do I move forward to corde of animation?
2 .- How do I add or remove FPS in unity?
Thank you.
hi this is in unity, How do for move the character (player) with the animation according?
Moving a character is often done with transform.Translate for motion and transform.Rotate for turning:-
var moveSpeed: float;
var turnSpeed: float;
function Update() {
var fwdMove = Input.GetAxis("Vertical") * moveSpeed;
transform.Translate(transform.forward * fwdMove * Time.deltaTime);
var rot = Input.GetAxis("Horizontal") * turnSpeed;
transform.Rotate(Vector3.up, rot * Time.deltaTime);
}
The reason for the Time.deltaTime is that this makes the movement speed independent of framerate. Time.deltaTime is actually the time taken for the last frame update.