[Solved] [Javascript] How do I change the pivot point at any time?

I have searched for a way to change the pivot point at runtime.
@Bouh gave me thie solution:

You can change pivot position with this :

var object = runtimeScene.getObjects("BOUH"); // Get all the objects called "BOUH"
var object_renderer = object[0].getRendererObject(); //Get the renderer (PIXI sprite) for the only first object called "BOUH"
object_renderer.pivot.x = 10;
object_renderer.pivot.y = 10;
3 Likes