New version of the iTween+AStar test project

Here is a sexier version of the test project mixing iTween and AStar tools (see first post about it).

iTween configuration has been tweaked to fit a more realistic trajectory (player’s orientation is better than previous version but still not totally satisfying).

Below the interesting part of the main script (Player.cs):

iTween.MoveTo(gameObject, iTween.Hash

(

“path”, path,

“orienttopath”, true,

“looktime”, 1.0,

“lookahead”, 0.05,

“axis”, “y”,

“easetype”, iTween.EaseType.linear,

“time”, iTween.PathLength(path) / moveSpeed,

“oncomplete”, “OnMoveComplete”

));

See iTween.MoveTo method’s documentation for more details about parameters.

It also uses the soldier model from the Unity3D “Bootcamp” demo and its animations, that’s why the web player build and project archive are a bit heavier than before ^^;

Try the Web Player version (4.4 Mo) and/or download the project sources (24.6 Mo).


Related posts:

Leave a Reply

Your email address will not be published. Please enter your name, email and a comment.