Admin Edit: Added code formating.
Hello again,
Checked both scenes, the setup is similar, but was not able to resolve the issue with any of the information i got from these scenes.
I have tried the tangent direction suggestion. It is slightly better, but still the same.
With tangent, the issue appears to be everytime we are nearing a point
With "Position" velocity, it seems that the issue is only present when the spline changes Direction from forward to backward and vice versa.
My code is as bellow.
I have also created a new game object with a script as bellow in order to ensure nothing from my players code creates the issue.
Issue unfortunately persists, when splineController nears the next point, there is some jingle/jitter behaviour on the rigidbody.
My Camera runs on LateUpdate
Have tried messing with the script priority order. Nothing worked.
Rigidbodies Interpolate is set to Interpolate for both the rigidbody of the splinecontroller and the player.
Have tried non and extrapolate, did not work
Any other suggestions?
Hello again,
Checked both scenes, the setup is similar, but was not able to resolve the issue with any of the information i got from these scenes.
I have tried the tangent direction suggestion. It is slightly better, but still the same.
With tangent, the issue appears to be everytime we are nearing a point
With "Position" velocity, it seems that the issue is only present when the spline changes Direction from forward to backward and vice versa.
My code is as bellow.
Code:
float speed = controller.Speed;
if (controller.MovementDirection == MovementDirection.Backward)
speed *= -1;
Vector3 tangent = controller.Spline.GetTangent(controller.RelativePosition);
currentVelocity = tangent * speed;I have also created a new game object with a script as bellow in order to ensure nothing from my players code creates the issue.
Code:
public class TestSplinePlatform : MonoBehaviour
{
public Rigidbody rb;
public SplineMovingPlatform splinePlatform;
public bool addForward;
private void FixedUpdate()
{
Vector3 direction = Vector3.zero;
if (addForward)
{
direction = transform.forward;
}
direction += splinePlatform.currentVelocity;
rb.velocity = direction;
}
}Issue unfortunately persists, when splineController nears the next point, there is some jingle/jitter behaviour on the rigidbody.
My Camera runs on LateUpdate
Have tried messing with the script priority order. Nothing worked.
Rigidbodies Interpolate is set to Interpolate for both the rigidbody of the splinecontroller and the player.
Have tried non and extrapolate, did not work
Any other suggestions?

