How to realize the track running

QQ截图20171018183228
This is a model track of obj. I want to make the camera go along the track, but I can’t solve the bending position. Can you provide methods or algorithms? Thank you

You could try to define a curve that represents the pathway of your track. If you sample this curve in the render loop, you can use these data for animation. SplineCurve might be a good choice. The drawback of this approach is you probably need to create the curve manually and can’t compute it from your geometry with convenient results.

BTW: Animating a camera along a curve is nothing special. A similar approach is used in this example. Activate the checkbox “animationView” to see the effect.

1 Like

Thank you. I’ve solved the problem with the ideas you’ve provided