Change direction for Z axe in gizmos

I am just showing you how you can manipulate the root mesh of the gizmo.

The mesh is being built this way:

public static _CreateArrow(scene: Scene, material: StandardMaterial): TransformNode {
        var arrow = new TransformNode("arrow", scene);
        var cylinder = CylinderBuilder.CreateCylinder("cylinder", { diameterTop: 0, height: 0.075, diameterBottom: 0.0375, tessellation: 96 }, scene);
        var line = CylinderBuilder.CreateCylinder("cylinder", { diameterTop: 0.005, height: 0.275, diameterBottom: 0.005, tessellation: 96 }, scene);
        line.material = material;
        cylinder.parent = arrow;
        line.parent = arrow;

        // Position arrow pointing in its drag axis
        cylinder.material = material;
        cylinder.rotation.x = Math.PI / 2;
        cylinder.position.z += 0.3;
        line.position.z += 0.275 / 2;
        line.rotation.x = Math.PI / 2;
        return arrow;
    }

So _arrow is this arrow object. it has two children, and you can get them using _arrow.getChildren(). I don’t know exactly what you want to do, but this would be the one way you can do this.

1 Like