Amalleus Posted March 1, 2017 Share Posted March 1, 2017 (edited) Hello. I occured some strange problem while exploring how to make animation. I made custom picture. Let's say it is a campfire fire (attached file). When i try to use it, it doesn't rotate like dart from blow dart. Dart is always directed to target but my animation picture is always forwarding right since i painted it and posted in sprite like so. BUT blowdart dart is forwarding same direction in sprite like my picture and it is rotating! Dart fly uses inst.AnimState:PlayAnimation("dart_pipe") And my animation is actually "action-animation" which uses next code ....... --making function of action "throw" projectile myaction.fn = function(act) act.doer.AnimState:PlayAnimation("throw") act.doer:DoTaskInTime(7*GLOBAL.FRAMES, function() local projectile = GLOBAL.SpawnPrefab("campFire_projectile") projectile:AddComponent("weapon") projectile.components.weapon.damage=0 projectile.Transform:SetPosition(act.doer.Transform:GetWorldPosition()) projectile.components.projectile:Throw(act.doer, act.target) end) return true end AddAction(myaction) Am i doing it wrong way? Is it possible to rotate it directing target? Edited March 1, 2017 by Amalleus mistake Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now