o = _Orbit.new()pt = {}pt[1] = {time = 0 ,pos = _Vector3.new(0, 0, 0)}pt[2] = {time = 1000 ,pos = _Vector3.new(50, 30, 20)}pt[3] = {time = 2000 ,pos = _Vector3.new(-15, -15, 0)}o:create(pt)temp = falsemsh = _mf:createCube()mat = _Matrix3D.new()pos1 = msh.transform:getTranslation();function render(e) _rd:drawAxis(100) msh.transform:setTranslation(pos1.x,pos1.y,o.pos.z) msh:drawMesh() if temp == true then o:update(e) end if temp38 == true then msh.transform:mulTranslationRight(0.01, 0, 0); elseif temp40 == true then msh.transform:mulTranslationRight(- 0.01, 0, 0); elseif temp37 == true then msh.transform:mulTranslationRight(0, 0.01, 0); elseif temp39 == true then msh.transform:mulTranslationRight(0, - 0.01, 0); end if o.over == true then o:create(pt) temp = false end pos1 = msh.transform:getTranslation();end_app:onIdle(render)function keyDown(x) if x == _System.KeySpace then temp=true elseif x == _System.KeyUp then temp38 = true; elseif x == _System.KeyDown then temp40 = true; elseif x == _System.KeyLeft then temp37 = true; elseif x == _System.KeyRight then temp39=true; end end_app:onKeyDown(keyDown)function keyUp(x) if x == _System.KeyUp then temp38 = false elseif x == _System.KeyDown then temp40 = false elseif x == _System.KeyLeft then temp37 = false elseif x == _System.KeyRight then temp39 = false endend_app:onKeyUp(keyUp)