Custom Mesh is not rotatin over its on axis

Dear friends,

Im trying to rotate a plane made as custom mesh over its own centered axis, but when I put that plane to rotate it rotates over an axis on one of the corners.

Can someone help me to solve this issue?

See on the playground what is happening:

Im trying to perform this rotation:

The custom mesh doesn’t appear to be perfectly aligned to the axis. You can add this line to center the rotation:


do you know how to put the rotation axis on the same direction on the bounding box? The center is parallel to the world axis

I’m not sure what are you trying to achieve, however because your custom mesh is not centered it will never rotate like the one on the picture.

These positions for example are perfectly aligned aroung the zero origin point:

    const positions = [
        -10, -1, 0,
        -10, 1, 0,
        10, 1, 0,
        10, -1, 0

The only thing you have to do is to recalc your coords so they are centered/aligned.
Or you can use position/rotation on the mesh to transform your mesh to a centered position and then you can use customMesh.bakeCurrentTransformIntoVertices() to bake the transform to the mesh.