Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving Platform
#9
Hi,
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:
  1. Update In set to Fixed Update
  2. 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.
Reply


Messages In This Thread
Moving Platform - by Kokoriko49 - 09-06-2024, 04:48 PM
RE: Moving Platform - by _Aka_ - 09-07-2024, 02:41 PM
RE: Moving Platform - by Kokoriko49 - 09-10-2024, 03:55 PM
RE: Moving Platform - by _Aka_ - 09-11-2024, 09:23 AM
RE: Moving Platform - by Kokoriko49 - 09-19-2024, 09:51 AM
RE: Moving Platform - by _Aka_ - 09-20-2024, 07:54 AM
RE: Moving Platform - by _Aka_ - 09-20-2024, 04:20 PM
RE: Moving Platform - by Kokoriko49 - 09-22-2024, 08:27 AM
RE: Moving Platform - by _Aka_ - 09-23-2024, 09:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Moving object down or up the spline using gravity velikizlivuk 6 325 07-26-2023, 10:06 PM
Last Post: _Aka_
  how to make fast moving controller go all the way to linear points?(curvy8) hawken 7 295 06-06-2023, 09:47 AM
Last Post: _Aka_
  Obstacle Moving Along the spline Chanon 1 127 06-13-2022, 04:13 PM
Last Post: _Aka_
  Possible to jump from platform to platform with Curvy splines? yun844 1 132 01-04-2022, 11:47 AM
Last Post: _Aka_

Forum Jump: