@@ -137,6 +137,7 @@ void SkeletalAnimation::CreateScene()
// Enable full blending weight and looping
state->SetWeight(1.0f);
state->SetLooped(true);
+ state->SetTime(Random(walkAnimation->GetLength()));
}
// Create our custom Mover component that will move & animate the model during each frame's update
@@ -82,6 +82,7 @@ function CreateScene()
-- Enable full blending weight and looping
state.weight = 1.0
state.looped = true
+ state.time = Random(walkAnimation.length)
-- Create our Mover script object that will move & animate the model during each frame's update.
@@ -85,6 +85,7 @@ void CreateScene()
state.weight = 1.0f;
state.looped = true;
+ state.time = Random(walkAnimation.length);
// Create our Mover script object that will move & animate the model during each frame's update. Here we use a shortcut
// script-only API function, CreateScriptObject, which creates a ScriptInstance component into the scene node, then uses