From 65c290a770876b91da2dc4cb43741eb330137742 Mon Sep 17 00:00:00 2001 From: JeffR Date: Thu, 15 May 2025 12:50:21 -0500 Subject: [PATCH] Simplified the code to the important part as we do the position math previously. Also added the stub for the onGUIEditorDropped --- .../scripts/assetTypes/creatorObj.tscript | 34 +++++-------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript index 28a1d2eac..a396231a9 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript @@ -30,30 +30,12 @@ function AssetBrowser::onFinishCreateObject(%this, %objId) function Creator::onWorldEditorDropped(%this, %position) { - if(EditorIsActive()) - { - %targetPosition = EWorldEditor.unproject(%position SPC 1); - %camPos = LocalClientConnection.camera.getPosition(); - %rayResult = containerRayCast(%camPos, %targetPosition, -1); - - %pos = ObjectCreator.getCreateObjectPosition(); - - if(%rayResult != 0) - { - %pos = getWords(%rayResult, 1, 3); - } - else - { - %pos = "0 0 0"; - } - - %func = %this.val[2]; - - $CurrentAssetBrowser.createdObjectPos = %pos; - %newObj = eval(%func); - } - else if(GuiEditorIsActive()) - { - %placeholderVar = ""; - } + %func = %this.val[2]; + + $CurrentAssetBrowser.createdObjectPos = %position; + %newObj = eval(%func); +} + +function Creator::onGUIEditorDropped(%this, %position) +{ }