mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Simplified the code to the important part as we do the position math previously.
Also added the stub for the onGUIEditorDropped
This commit is contained in:
parent
c6213f0d12
commit
65c290a770
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue