Does anyone know if there a simple way of obtaining an object's x and y position in the editor / layout for use in the edittime.js?
Develop games in your browser. Powerful, performant & highly capable.
Don't worry - sorted by using maths...
For anyone else who might get stuck:
var size = this.instance.GetSize();
var w = size.x;
var h = size.y;
var texhs = texture.GetHotspot();
var quad = this.instance.GetBoundingQuad();
var origin = new cr.vector2(Math.round(quad.tlx + Math.cos(a) * w * texhs.x - Math.sin(a) * h * texhs.y), Math.round(quad.tly + Math.sin(a) * w * texhs.x + Math.cos(a) * h * texhs.y));