mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: update on input
This commit is contained in:
1 parent
864c29933a
commit
605edd547d
1 file changed
+3
@@ -2,6 +2,7 @@ import { Flex, TextField } from '@radix-ui/themes';
|
|||||||
import { use, useEffect, useRef } from 'react';
|
import { use, useEffect, useRef } from 'react';
|
||||||
import { applyPitchYawLimits } from '../../../../../core/blitz/applyPitchYawLimits';
|
import { applyPitchYawLimits } from '../../../../../core/blitz/applyPitchYawLimits';
|
||||||
import { modelDefinitions } from '../../../../../core/blitzkrieg/modelDefinitions';
|
import { modelDefinitions } from '../../../../../core/blitzkrieg/modelDefinitions';
|
||||||
|
import { modelTransformEvent } from '../../../../../core/blitzkrieg/modelTransform';
|
||||||
import mutateTankopedia, {
|
import mutateTankopedia, {
|
||||||
useTankopedia,
|
useTankopedia,
|
||||||
} from '../../../../../stores/tankopedia';
|
} from '../../../../../stores/tankopedia';
|
||||||
@@ -66,6 +67,7 @@ export function RotationInputs() {
|
|||||||
gunModelDefinition.pitch,
|
gunModelDefinition.pitch,
|
||||||
turretModelDefinition.yaw,
|
turretModelDefinition.yaw,
|
||||||
);
|
);
|
||||||
|
modelTransformEvent.emit({ pitch, yaw });
|
||||||
mutateTankopedia((state) => {
|
mutateTankopedia((state) => {
|
||||||
state.model.physical.pitch = pitch;
|
state.model.physical.pitch = pitch;
|
||||||
state.model.physical.yaw = yaw;
|
state.model.physical.yaw = yaw;
|
||||||
@@ -101,6 +103,7 @@ export function RotationInputs() {
|
|||||||
gunModelDefinition.pitch,
|
gunModelDefinition.pitch,
|
||||||
turretModelDefinition.yaw,
|
turretModelDefinition.yaw,
|
||||||
);
|
);
|
||||||
|
modelTransformEvent.emit({ pitch, yaw });
|
||||||
mutateTankopedia((state) => {
|
mutateTankopedia((state) => {
|
||||||
state.model.physical.pitch = pitch;
|
state.model.physical.pitch = pitch;
|
||||||
state.model.physical.yaw = yaw;
|
state.model.physical.yaw = yaw;
|
||||||
|
|||||||
Reference in new issue
Block a user