Variable: LocomotionEnvironment
constLocomotionEnvironment:Component<{_envHandle: {default:number;type:Float32; };_initialized: {default:false;type:Boolean; };type: {default:"static";enum: { };type:Enum; }; }>
Defined in: packages/core/src/locomotion/locomotion.ts:33
Marks an entity's object3D hierarchy as walkable environment for the locomotion engine.
Remarks
- Set EnvironmentType to
STATICfor fixed geometry (merged once) orKINEMATICfor moving platforms (matrices streamed each frame via LocomotionSystem.update). - Attach this component to the environment root you want the player to stand on.
Example
ts
const floor = world.createTransformEntity(gltf.scene);
floor.addComponent(LocomotionEnvironment, { type: EnvironmentType.STATIC });