Rollercoaster camera stuttering (workshop example)

I would like to add speed controls to this rollercoaster playground example from the workshop docs:

I can change the speed of the rollercoaster by modifying line 571:

var speed = 0.5;

However, the scene begins to stutter when the passenger turns to look out at the start of the run and also on the curve up/down sections. Flat track appears to render smoothly.

What is the cause of this stuttering?

Thank you.

I was lazy on the param names and but that should get you going the right way.

Basically you have to interpolate between your points when you have a speed that is not a whole number.

You will want to fix the camera look at stuff but yeah this is the idea.

2 Likes

Hi @Coaster

I guess you need to generate more sections on the curved tracks. The transformation from one point to the next is probably too much. It is more noticeable when the speed is slower. If you can add more sections on the curved tracks, the transformation should be more smooth.

1 Like

Very helpful pointers, thank you both!

I’ll now try to make sense of the workshop guide and figure out how to implement the controls.