How do i draw things on the fly using paper.js in wick? also ai is stupid

const polygonBody = window.polygonBody;
const paper = this.view.paper; // get a copy of the PaperJS API


const vectorPoints = polygonBody.vertices;

const paperPath = new paper.Path({
    segments: vectorPoints,
    pivot: Matter.Vertices.centre(vectorPoints), // To center the paper Path properly
    strokeColor: 'black',
    fillColor: 'blue',
    closed: true,
    applyMatrix: false, // Store the rotation
});

const wickPath = new Wick.Path({
    path: paperPath
});
// Add it to the active frame.
project.activeFrame.addPath(wickPath);
onEvent('update', function () {
    wickPath.x = polygonBody.position.x;
    wickPath.y = polygonBody.position.y;
    wickPath.view.item.rotation = polygonBody.angle * 180/Math.PI; // Set the rotation of the paper Path
});

found out how to fix this! besides the rotation, the code also fixes a centering issue of the paperPath

thanks so much! this works perfectly, it opens up so many opportunities for games!