Update scene document version and player start collider settings

This commit is contained in:
2026-04-04 15:51:56 +02:00
parent 30104e815b
commit 450ffc5299
3 changed files with 13 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ import {
type ProjectAssetRecord
} from "../assets/project-assets";
import {
createPlayerStartColliderSettings,
createInteractableEntity,
normalizeEntityName,
createPointLightEntity,
@@ -24,6 +25,7 @@ import {
createSpotLightEntity,
createTeleportTargetEntity,
createTriggerVolumeEntity,
isPlayerStartColliderMode,
type EntityInstance
} from "../entities/entity-instances";
import {
@@ -57,6 +59,7 @@ import {
IMPORTED_MODEL_COLLIDERS_SCENE_DOCUMENT_VERSION,
LOCAL_LIGHTS_AND_SKYBOX_SCENE_DOCUMENT_VERSION,
MODEL_ASSET_PIPELINE_SCENE_DOCUMENT_VERSION,
PLAYER_START_COLLIDER_SETTINGS_SCENE_DOCUMENT_VERSION,
RUNNER_V1_SCENE_DOCUMENT_VERSION,
SPATIAL_AUDIO_SCENE_DOCUMENT_VERSION,
SCENE_DOCUMENT_VERSION,

View File

@@ -6,7 +6,8 @@ import type { InteractionLink } from "../interactions/interaction-links";
import { cloneMaterialRegistry, createStarterMaterialRegistry, type MaterialDef } from "../materials/starter-material-library";
import { createDefaultWorldSettings, type WorldSettings } from "./world-settings";
export const SCENE_DOCUMENT_VERSION = 16 as const;
export const SCENE_DOCUMENT_VERSION = 17 as const;
export const PLAYER_START_COLLIDER_SETTINGS_SCENE_DOCUMENT_VERSION = 17 as const;
export const IMPORTED_MODEL_COLLIDERS_SCENE_DOCUMENT_VERSION = 16 as const;
export const ENTITY_NAMES_SCENE_DOCUMENT_VERSION = 15 as const;
export const SPATIAL_AUDIO_SCENE_DOCUMENT_VERSION = 13 as const;

View File

@@ -629,7 +629,14 @@ export function areEntityInstancesEqual(left: EntityInstance, right: EntityInsta
}
case "playerStart": {
const typedRight = right as PlayerStartEntity;
return left.yawDegrees === typedRight.yawDegrees;
return (
left.yawDegrees === typedRight.yawDegrees &&
left.collider.mode === typedRight.collider.mode &&
left.collider.eyeHeight === typedRight.collider.eyeHeight &&
left.collider.capsuleRadius === typedRight.collider.capsuleRadius &&
left.collider.capsuleHeight === typedRight.collider.capsuleHeight &&
areVec3Equal(left.collider.boxSize, typedRight.collider.boxSize)
);
}
case "soundEmitter": {
const typedRight = right as SoundEmitterEntity;