hedphelym
26-10-2009 22:35:13
Hi again,
I've been trying for 1 day now, and cannot understand what I do wrong.
I've been reading the ogre manual, and tried my best.
What I am doing, is to keyframe a object (Node animation), and then I export with "Ogremax",
then in the Ogremax viewer the object moves as it should.
What i then do, is the following:
I have a function that's named "setupanimation":
When I call it, and read the console, it says the correct time and everything, but it won't play..
I then use the "settime" thing, to try to move it forwards in time, but that does not work either.
Then in my "on every frame" function i have :
Also tried this because i found it in a topic:
still no luck. Any help would be greatly appreciated.
I've been trying for 1 day now, and cannot understand what I do wrong.
I've been reading the ogre manual, and tried my best.
What I am doing, is to keyframe a object (Node animation), and then I export with "Ogremax",
then in the Ogremax viewer the object moves as it should.
What i then do, is the following:
I have a function that's named "setupanimation":
private void setupanimations()
{
Entity myanimobj = sceneMgr.GetEntity("Box02");
Myanimstate = myanimobj.GetAnimationState("spin");
Myanimstate.Enabled = true;
Myanimstate.Loop = true;
Console.WriteLine("Myanim Length: " + Myanimstate.Length);
Console.WriteLine("Myanim Name:" + Myanimstate.AnimationName);
Console.WriteLine("Myanimstate.HasEnded:" + Myanimstate.HasEnded);
}
When I call it, and read the console, it says the correct time and everything, but it won't play..
I then use the "settime" thing, to try to move it forwards in time, but that does not work either.
Then in my "on every frame" function i have :
Myanimstate.AddTime(evt.timeSinceLastFrame);
Also tried this because i found it in a topic:
Myanimstate.AddTime(evt.timeSinceLastFrame *0.1f);
still no luck. Any help would be greatly appreciated.