heading

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

heading

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;
else
  new_pH = pH + math.pi;
end
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
atom0s
Site Admin
Posts: 304
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
Locked