Yakuzashi Posted October 2, 2020 Share Posted October 2, 2020 Howdy. I need your help with projectile that is facing the wrong direction. It's artillery shell and I need its tip to be directed to the target. I have tried using local function OnThrown(inst) inst.AnimState:SetOrientation(ANIM_ORIENTATION.OnGround) inst.AnimState:PlayAnimation("idle") end but it does not work. I have also looked into boomerang and blowdart and didn't find any clue. If someone approached the same problem in the past I will be grateful for your help. Link to comment Share on other sites More sharing options...
IronHunter Posted October 3, 2020 Share Posted October 3, 2020 This is likely a problem with your spriter file, as rotation using ANIM_ORIENTATION.OnGround means it'll rotate the spriter animation to match the entities rotation in the world. The default direction for said sprites should be facing to the right perfectly in line with the x-axis If you want it to rotate like a boomerang then it's part of the spriter animation which animates it to spin around the origin (center of the x and y axis) I am assuming you are familiar with how pivot points work for symbols in a spriter file and how they translate to in game animations. 1 1 Link to comment Share on other sites More sharing options...
Yakuzashi Posted October 3, 2020 Author Share Posted October 3, 2020 @IronHunter Ah, I see now. Thank you for help and sorry for wasting your time on such trivial thing. Have a nice evening! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now