动画师在spine骨骼上画了一个BoundingBox,用于碰撞范围,请问如何获取这个多变形的顶点坐标,并给其加上物理碰撞?
在网上看到如下写法:
//sk是人物的骨骼动画,获取骨骼动画上的挂件
let attachment = this.sk.getAttachment(‘hero’, “hurt”)
//获取hero的骨骼
let slot = this.sk.findSlot(“hero”);
//获取hurt的顶点数组
let arr = {}
let data = attachment.computeWorldVertices(slot, 0, attachment.worldVerticesLength, arr, 0, 2)
console.log(“多边形挂件:”,attachment);
console.log(“多边形顶点:”, arr);
但是arr打印出来后全是0
