I think I’m close but it’s not exactly correct. Seems like it’s offset about 90°
var CollisionShader = pc.createScript('collisionShader');
CollisionShader.attributes.add('collisionEntity', { type: 'entity' });
CollisionShader.prototype.initialize = function () {
this.collision = this.collisionEntity.collision;
};
CollisionShader.prototype.update = function (dt) {
let point = this.collisionEntity.getLocalPosition().clone().add(this.collision.linearOffset);
let mat = this.collisionEntity.parent.getWorldTransform().clone()
point = mat.transformPoint(point);
this.app.drawWireSphere(point, 0.025, pc.Color.MAGENTA, 20, false);
};