mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +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 { applyPitchYawLimits } from '../../../../../core/blitz/applyPitchYawLimits';
|
||||
import { modelDefinitions } from '../../../../../core/blitzkrieg/modelDefinitions';
|
||||
import { modelTransformEvent } from '../../../../../core/blitzkrieg/modelTransform';
|
||||
import mutateTankopedia, {
|
||||
useTankopedia,
|
||||
} from '../../../../../stores/tankopedia';
|
||||
@@ -66,6 +67,7 @@ export function RotationInputs() {
|
||||
gunModelDefinition.pitch,
|
||||
turretModelDefinition.yaw,
|
||||
);
|
||||
modelTransformEvent.emit({ pitch, yaw });
|
||||
mutateTankopedia((state) => {
|
||||
state.model.physical.pitch = pitch;
|
||||
state.model.physical.yaw = yaw;
|
||||
@@ -101,6 +103,7 @@ export function RotationInputs() {
|
||||
gunModelDefinition.pitch,
|
||||
turretModelDefinition.yaw,
|
||||
);
|
||||
modelTransformEvent.emit({ pitch, yaw });
|
||||
mutateTankopedia((state) => {
|
||||
state.model.physical.pitch = pitch;
|
||||
state.model.physical.yaw = yaw;
|
||||
|
||||
Reference in new issue
Block a user