Hi, im using urhosharp ( the c# bindings of Urho3d) and im trying to get a material to move acros the surface of the model im applying it to. I’ve tried to use an animation of the uvoffset but it hasnt worked, all that happened is that my texture was stretched, no animation occurs.
Does anyone have a c++ code example for this? I can translate it to c# by myself.
This is what ive tried:
Material mushroomMat = ResourceCache.GetMaterial("Materials/StoneTiled.xml");
ValueAnimation uvShiftAnimation = new ValueAnimation();
uvShiftAnimation.SetKeyFrame(0.0f, new Vector2(0.0f, 0.0f));
uvShiftAnimation.SetKeyFrame(1.0f, new Vector2(0.0f, 1.0f));
mushroomMat.Scene=scene;
mushroomMat.SetShaderParameterAnimation("VOffset", uvShiftAnimation/*, WrapMode.Loop, 1.0f*/);