- Home /
Question by
Bunnehop0923 · Jan 31, 2021 at 06:20 AM ·
stutter
fix cinemachine stutter problem when only moving left or right
I've tried setting the rigidbody2d to interlope and changing the update types in cinemachine brain nothing works please help
here's my movement code void Update() {
//movement code
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = 0;
moveCharacter(new Vector2(moveHorizontal, moveVertical));
Vector2 movement = new Vector2(moveHorizontal, moveVertical);
rb2d.AddForce(movement * speed);
if (Input.GetKey(KeyCode.JoystickButton1))
{
if (canjump)
{
rb2d.velocity = new Vector2(rb2d.velocity.x, jump);
jumpsleft--;
}
}
void moveCharacter(Vector2 direction)
{
transform.Translate(direction * speed * Time.deltaTime);
}
//movement end of code
}
Comment
Your answer
Follow this Question
Related Questions
issue with jerkyness (jittery rendering/movement) every couple of seconds. 1 Answer
Stuttering and trigger issues after switching player sprite. 1 Answer
Camera doesn't move smoothly at 60fps 1 Answer
Game runs smoothly in landscape mode but lags/stutters in portrait! 1 Answer
Stuttering / performance issue with certain JS scripts 0 Answers