Pictomancy is a library for drawing 3D world overlays in Dalamud plugins. Pictomancy has an ImGui-like interface that operates in world space instead of a 2D canvas. Pictomancy simplifies the hard parts of 3D overlays by correctly clipping objects behind the camera and clipping around the native UI.
Use as a git sub-module.
git submodule add https://github.com/sourpuh/ffxiv_pictomancy
Library initialization:
public MyPlugin(DalamudPluginInterface pluginInterface)
{
PictoService.Initialize(pluginInterface);
... Your Code Here ...
}
public void Dispose()
{
PictoService.Dispose();
... Your Code Here ...
}
Drawing various shapes:
using (var drawList = PictoService.Draw())
{
if (drawList == null)
return;
// Draw a circle around a GameObject's hitbox
Vector3 worldPosition = gameObject.Position;
float radius = gameObject.HitboxRadius;
drawList.AddCircleFilled(worldPosition, radius, fillColor);
drawList.AddCircle(worldPosition, radius, outlineColor);
}