I have many points that served as a track, and I want fly camera follow this track with optional offset, and require camera's direction always toward the front (the track point's tangent direction).
currently, I use ISceneManager::createFollowSplineAnimator(), that can control camera follow track (a spline), but the fly speed seems not uniform and sometime backward fly, and the camera's direction also not controlled.
So, If I want camera fly by my rule, I must write myself animator?
thanks.
how to fly camera follow spline?
-
randomMesh
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Re: how to fly camera follow spline?
A spline is not just a set of way points. It interpolates between them.lab_zj wrote:I have many points that served as a track, and I want fly camera follow this track...
...I use ISceneManager::createFollowSplineAnimator(), ... but the fly speed seems not uniform and sometime backward fly, and the camera's direction also not controlled.
irrlicht api wrote: The animator modifies the position of
the attached scene node to make it follow a hermite spline.
It uses a subset of hermite splines: either cardinal splines
(tightness != 0.5) or catmull-rom-splines (tightness == 0.5).
No, createFollowSplineAnimator() should be fine if properly used.lab_zj wrote:So, If I want camera fly by my rule, I must write myself animator?
lab_zj wrote:and the camera's direction also not controlled
Code: Select all
camera->setTarget()
"Whoops..."
Re: how to fly camera follow spline?
you could try the ideas put forward in this threadlab_zj wrote:and the camera's direction also not controlled.
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=22480
I did see another thread the other day with a different idea but now I cant find it again.