human bug fix

This commit is contained in:
2025-08-22 15:38:17 +05:30
parent 8067a7fca6
commit 88b09c44d2

View File

@@ -139,8 +139,8 @@ function WorkerInstance({ human }: { human: HumanStatus }) {
}
} else if (!human.isActive && human.state === 'idle' && human.currentPhase === 'dropping' && human.currentLoad === 0) {
if (action.pickUpPoint && action.dropPoint) {
// const dropToPickup = computePath(action.dropPoint.position || [0, 0, 0], action.pickUpPoint.position || [0, 0, 0]);
// setPath(dropToPickup);
const dropToPickup = computePath(action.dropPoint.position || [0, 0, 0], action.pickUpPoint.position || [0, 0, 0]);
setPath(dropToPickup);
setCurrentPhase(human.modelUuid, 'init');
setHumanState(human.modelUuid, 'running');
setHumanActive(human.modelUuid, true);