Side note: No tag for thin instances?
Switching from instances to thin instances, and the rotation seems to be from a corner of the mesh, not from the pivot point. When creating normal instances, the rotation seems to work just fine.
How do I set the pivot point when trying to rotate thin instances?
Maybe I’m doing something wrong?
- Playground: https://playground.babylonjs.com/#SHBR9S#35
- Pivot Point set:
- Creating Thin Instances (
- To create normal instances change
const position = new BABYLON.Vector3(center.y, 0, center.x); const rotation = this.GetRandomYRotation(); // Vector3 in radians const rotateQuaternion = BABYLON.Quaternion.FromEulerVector(rotation); const matrix = BABYLON.Matrix.Compose(BABYLON.Vector3.One(), rotateQuaternion, position); const thinInstance = prefab.thinInstanceAdd(matrix);