feat(repair): mount Ebike on TestMap and snap repair to parked position
The Physique test scene now mounts the real Ebike component for the ebike repair zone, mirroring GameStageContent so the bike model and its interactions (mount/dismount, parked position tracking) are available when testing the repair flow. RepairGame derives its live world position from window.ebikeParkedPosition once the ebike mission leaves the locked/waiting phase, so the repair sequence happens wherever the player parked the bike rather than at the static zone anchor.
This commit is contained in:
@@ -3,6 +3,7 @@ import { Component, useRef, useState, useEffect } from "react";
|
||||
import * as THREE from "three";
|
||||
import { Physics, RigidBody, CuboidCollider } from "@react-three/rapier";
|
||||
import { Line } from "@react-three/drei";
|
||||
import { Ebike } from "@/components/ebike/Ebike";
|
||||
import { RepairGame } from "@/components/three/gameplay/RepairGame";
|
||||
import { GrabbableObject } from "@/components/three/interaction/GrabbableObject";
|
||||
import { AnimatedModel } from "@/components/three/models/AnimatedModel";
|
||||
@@ -239,6 +240,9 @@ export function TestMap({ onOctreeReady }: TestMapProps): React.JSX.Element {
|
||||
<group position={zone.position}>
|
||||
<RepairPlaygroundZoneMarker color={zone.color} />
|
||||
</group>
|
||||
{zone.mission === "ebike" ? (
|
||||
<Ebike position={zone.position} />
|
||||
) : null}
|
||||
<RepairGame mission={zone.mission} position={zone.position} />
|
||||
</group>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user