- Home /
Why is Character just moving "smooth" when camera follows?
Hej guys,
i have a question about "smoothness".
i´m working around on a 2D Plattformer, and most things work fine, but i recognized, if the camera does not follow my character, his movement doesn´t look smooth. it is..i don´t know "itchy" ?
I just move a plane with a character controller attached to it, with those methods in the update function: void Movement() { if(onoff) {
if(character.isGrounded)
{
if(jump)
moveDir.y = jumppower;
}
moveDir.y -= grav;
moveDir.x = horizontal;
character.Move(moveDir * Time.deltaTime);
}
}
void InputChecking()
{
if(onoff) {
horizontal = Input.GetAxis("Horizontal") * speed;
if (horizontal > 0)
{
lookright = true;
}
if (horizontal < 0)
{
lookright = false;
}
if(Input.GetButtonDown("Jump"))
{
jump = true;
} else
{
jump = false;
}
}
}
When the camra follows the character he is allways "centered".
Could you explain me, why he is "stottering" without a following camera?
I think it would be helpful to see the "Character.$$anonymous$$ove" method. $$anonymous$$y first reaction was that you weren't making your movement FPS independent, but you are using Delta time so I'm not sure what is going on.
the character.move $$anonymous$$ethod is a $$anonymous$$ethod of the "CharacterController" (Physic Component that comes with Unity)
Your answer
Follow this Question
Related Questions
Character Controller problem 0 Answers
Smooth Camera Movement script with problem. 0 Answers
Character controller wont move 1 Answer
CharacterController NullReferenceException dispite attached to object 1 Answer
Smooth Character Movement 1 Answer