@relu-interactives/spatial-ecs 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3263,11 +3263,19 @@ function createTeleportArea({
3263
3263
  depthWrite: false
3264
3264
  });
3265
3265
  const object = new THREE31__namespace.Mesh(geometry, material);
3266
- object.rotation.x = -Math.PI / 2;
3267
3266
  const entityId = createBaseEntity(world, object, {
3268
3267
  label: payload.name ?? "Teleport Area",
3269
3268
  entityType: "teleportArea",
3270
- transformInput: payload.transform
3269
+ // The flat-on-the-ground rotation must live in the ECS TRANSFORM, not on
3270
+ // the Object3D: createBaseEntity applies the transform over the object, and
3271
+ // TransformSyncSystem re-applies it every frame — so a rotation set
3272
+ // directly on the mesh is overwritten immediately and the area stands up
3273
+ // like a wall. Same convention as the `plane` primitive.
3274
+ transformInput: {
3275
+ position: payload.transform?.position,
3276
+ rotation: payload.transform?.rotation ?? { x: -Math.PI / 2, y: 0, z: 0 },
3277
+ scale: payload.transform?.scale
3278
+ }
3271
3279
  });
3272
3280
  world.addComponent(
3273
3281
  entityId,