FSO.LotView.Components.AvatarComponent.GetScreenPos C# (CSharp) Method

GetScreenPos() public method

public GetScreenPos ( WorldState world ) : Vector2
world WorldState
return Vector2
        public override Vector2 GetScreenPos(WorldState world)
        {
            var headpos = Avatar.Skeleton.GetBone("HEAD").AbsolutePosition / 3.0f;
            var transhead = Vector3.Transform(new Vector3(headpos.X, headpos.Z, headpos.Y), Matrix.CreateRotationZ((float)(RadianDirection + Math.PI))) + this.Position - new Vector3(0.5f, 0.5f, 0f);
            return world.WorldSpace.GetScreenFromTile(transhead) + world.WorldSpace.GetScreenOffset() + PosCenterOffsets[(int)world.Zoom - 1];
        }