- Home /
Rigidbody movement stuttering problem
Hi, I've been struggling with this problem for multiple days. I've done lots of research and watched tons of tutorials on this but still couldn't solve the problem. I literally tried everything. I hope you guys can help me out.
This is the line of code that moves my character forward. I tried putting this in Update, I also removed Time.deltaTime but it didn't solve the problem.
void FixedUpdate(){
rb.velocity = transform.forward * Time.deltaTime * movementSpeed;
}
This is my Camera follow script. I tried putting this in FixedUpdate and LateUpdate, nothing changed.
public Transform PlayerTransform;
void Start(){
_cameraOffset = transform.position - PlayerTransform.position;
}
void Update()
{
Vector3 newPos = PlayerTransform.position + _cameraOffset;
transform.position = Vector3.Lerp(transform.position, newPos, SmoothFactor);
}
I also tried using Cinemachine but it didn't solve the problem too. Any help is appreciated, thanks in advance.
Your answer
Follow this Question
Related Questions
Child of camera getting locked on position 0 Answers
How to rotate a Rigidbody without rotating the gameObject? 1 Answer
My game is laggy, but there are only a ball and some flat platforms. 3 Answers
How do I add a camera bounce effect every time the player lands? 0 Answers
Camera movement help 1 Answer