mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
fix: no cam pos reset on tank swap
This commit is contained in:
1 parent
bc211822aa
commit
e0feb45f48
1 file changed
+3
@@ -52,11 +52,14 @@ export function Controls() {
|
||||
protagonistTrackModelDefinition.origin[1] +
|
||||
antagonistModelDefinition.turretOrigin[1] +
|
||||
antagonistTurretModelDefinition.gunOrigin[1];
|
||||
// const hasSetInitialPose = useRef(false);
|
||||
|
||||
useEffect(() => {
|
||||
camera.position.set(-4, 4, -16);
|
||||
orbitControls.current?.target.set(0, 1.25, 0);
|
||||
}, [camera]);
|
||||
|
||||
useEffect(() => {
|
||||
const unsubscribeTankopedia = useTankopediaPersistent.subscribe(
|
||||
(state) => state.model.visual.controlsEnabled,
|
||||
(enabled) => {
|
||||
|
||||
Reference in new issue
Block a user