mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
Added convenience function to take control of selected entity if it supports it.
This commit is contained in:
parent
168d4d9f0a
commit
c729f603b8
2 changed files with 11 additions and 2 deletions
|
|
@ -587,6 +587,13 @@ function makeSelectedAMesh()
|
||||||
EditorTree.buildVisibleTree( true );
|
EditorTree.buildVisibleTree( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function EditorTakeControlOfEntity()
|
||||||
|
{
|
||||||
|
%object = EWorldEditor.getSelectedObject(0);
|
||||||
|
switchCamera(localClientConnection, %object);
|
||||||
|
switchControlObject(localClientConnection, %object);
|
||||||
|
}
|
||||||
|
|
||||||
function EditorMount()
|
function EditorMount()
|
||||||
{
|
{
|
||||||
echo( "EditorMount" );
|
echo( "EditorMount" );
|
||||||
|
|
|
||||||
|
|
@ -379,8 +379,10 @@ function EditorGui::buildMenus(%this)
|
||||||
Item[17] = "Make Selection Prefab" TAB "" TAB "EditorMakePrefab();";
|
Item[17] = "Make Selection Prefab" TAB "" TAB "EditorMakePrefab();";
|
||||||
Item[18] = "Explode Selected Prefab" TAB "" TAB "EditorExplodePrefab();";
|
Item[18] = "Explode Selected Prefab" TAB "" TAB "EditorExplodePrefab();";
|
||||||
Item[19] = "-";
|
Item[19] = "-";
|
||||||
Item[20] = "Mount Selection A to B" TAB "" TAB "EditorMount();";
|
Item[20] = "Take control of entity" TAB "" TAB "EditorTakeControlOfEntity();";
|
||||||
Item[21] = "Unmount Selected Object" TAB "" TAB "EditorUnmount();";
|
Item[21] = "-";
|
||||||
|
Item[22] = "Mount Selection A to B" TAB "" TAB "EditorMount();";
|
||||||
|
Item[23] = "Unmount Selected Object" TAB "" TAB "EditorUnmount();";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue