feat: Refactor human action handling to support animated travel and streamline action structure

This commit is contained in:
2025-07-03 12:11:58 +05:30
parent b5c69f3335
commit 98f4d48db2
10 changed files with 75 additions and 282 deletions

View File

@@ -155,8 +155,8 @@ function TriggerConnector() {
// Handle Human point
else if (event.type === "human" && 'point' in event) {
const point = event.point;
point.actions?.forEach(action => {
action.triggers?.forEach(trigger => {
if (point.action?.triggers) {
point.action.triggers.forEach(trigger => {
if (trigger.triggeredAsset && trigger.triggeredAsset.triggeredPoint) {
newConnections.push({
id: `${point.uuid}-${trigger.triggeredAsset.triggeredPoint.pointUuid}-${trigger.triggerUuid}`,
@@ -166,7 +166,7 @@ function TriggerConnector() {
});
}
});
});
}
}
});