Add steer parameter to CSceneNodeAnimatorFollowSpline which allows rotating node toward direction of movement.
Thanks @ Bate for the patch (patch #175 with minor changes). git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6234 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@@ -22,7 +22,7 @@ namespace scene
|
||||
//! constructor
|
||||
CSceneNodeAnimatorFollowSpline(u32 startTime,
|
||||
const core::array< core::vector3df >& points,
|
||||
f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false);
|
||||
f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false, bool steer=false);
|
||||
|
||||
//! animates a scene node
|
||||
virtual void animateNode(ISceneNode* node, u32 timeMs) _IRR_OVERRIDE_;
|
||||
@@ -52,6 +52,7 @@ namespace scene
|
||||
f32 Tightness;
|
||||
bool Loop;
|
||||
bool PingPong;
|
||||
bool Steer; // rotate depending on current movement
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user