liu.qiang2 Posted January 9, 2015 Share Posted January 9, 2015 I made a model button, it can be pressed and automatic recovery. But in my practice, it can't playback in current state. ObjectSkinnedMesh m_skinnedmesh; .... m_skinnedmesh.setAnimation(0,m_animationName); ... float time=engine.app.getTime(); m_skinnedmesh.setFrame(0,time*30); I want to playback the animation once comletely 1 Link to comment
angus.wood Posted January 9, 2015 Share Posted January 9, 2015 Combine the setSpeed(), play() and setLoop() functions to play your animation once. e.g. ObjectMeshSkinned osm, osm = node_cast(engine.editor.getNode(engine.editor.findNode("mynode"))); osm.setAnimation("animations/foo.sanim"); osm.setSpeed(30); osm.setTime(0.0f); osm.setLoop(0); osm.play(); Link to comment
Recommended Posts