09-23-2024, 09:20 AM
Hi,
I fixed the jittering by:
This way, I got smooth movement.
I hope this helped.
Have a nice day
I fixed the jittering by:
- Modifying your script to this:
Code:public class CapsuleMover : MonoBehaviour
{
public Rigidbody rb;
public Transform splinePlatform;
private Vector3 previousPlatformPosition;
void Start()
{
previousPlatformPosition = splinePlatform.transform.position;
}
private void FixedUpdate()
{
rb.position += splinePlatform.transform.position - previousPlatformPosition;
previousPlatformPosition = splinePlatform.transform.position;
}
} - Configuring the controller to:
- Update In set to Fixed Update
- Target Component set to Transform
This way, I got smooth movement.
I hope this helped.
Have a nice day
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Available for freelance work—feel free to reach out.