Discuss the development of Lua addons for Ashita here.
Posts: 16
Joined: Sun May 15, 2016 1:53 pm


Post by gilles » Sun Oct 16, 2016 9:55 am

i'm playing with character heading function
but i have a problem to set it

Code: Select all

local Entity = AshitaCore:GetDataManager():GetEntity();
local party = AshitaCore:GetDataManager():GetParty();
pH = Entity:GetHeading(party:GetPartyMemberTargetIndex(0));
if (pH > 0) then
  new_pH = pH - math.pi;
  new_pH = pH + math.pi;
Entity:SetHeading(party:GetPartyMemberTargetIndex(0), new_pH)
i tried 2 functions : SetHeading and SetLocalYaw
but unfortunately character is not turning

i tried in different views
User avatar
Site Admin
Posts: 326
Joined: Sat May 14, 2016 5:13 pm

Re: heading

Post by atom0s » Sun Oct 16, 2016 3:09 pm

The heading exposed there is not what you need to edit to actually change your heading direction. The proper value is within the players warp structure but that is not exposed through Ashita outside of the Warp pointer. You will have to handle the offset and such yourself.
Lead Ashita Developer