mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-12 00:40:44 +00:00
Added convenience function to take control of selected entity if it supports it.
This commit is contained in:
parent
0135418046
commit
380c5814ff
2 changed files with 11 additions and 2 deletions
|
|
@ -587,6 +587,13 @@ function makeSelectedAMesh()
|
|||
EditorTree.buildVisibleTree( true );
|
||||
}
|
||||
|
||||
function EditorTakeControlOfEntity()
|
||||
{
|
||||
%object = EWorldEditor.getSelectedObject(0);
|
||||
switchCamera(localClientConnection, %object);
|
||||
switchControlObject(localClientConnection, %object);
|
||||
}
|
||||
|
||||
function EditorMount()
|
||||
{
|
||||
echo( "EditorMount" );
|
||||
|
|
|
|||
|
|
@ -379,8 +379,10 @@ function EditorGui::buildMenus(%this)
|
|||
Item[17] = "Make Selection Prefab" TAB "" TAB "EditorMakePrefab();";
|
||||
Item[18] = "Explode Selected Prefab" TAB "" TAB "EditorExplodePrefab();";
|
||||
Item[19] = "-";
|
||||
Item[20] = "Mount Selection A to B" TAB "" TAB "EditorMount();";
|
||||
Item[21] = "Unmount Selected Object" TAB "" TAB "EditorUnmount();";
|
||||
Item[20] = "Take control of entity" TAB "" TAB "EditorTakeControlOfEntity();";
|
||||
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