mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-18 22:23:48 +00:00
add cover tool
add cover tool some more cleanup navmeshselecttool needs to use collideBox duDebugDrawTorque now has the transparent blending option
This commit is contained in:
parent
24ec55e8bc
commit
b5d6601b96
11 changed files with 142 additions and 88 deletions
|
|
@ -44,7 +44,7 @@ void NavMeshSelectTool::on3DMouseDown(const Gui3DMouseEvent& evt)
|
|||
Point3F endPnt = evt.pos + evt.vec * 1000.0f;
|
||||
|
||||
RayInfo ri;
|
||||
if (gServerContainer.castRay(startPnt, endPnt, MarkerObjectType, &ri))
|
||||
if (gServerContainer.collideBox(startPnt, endPnt, MarkerObjectType, &ri))
|
||||
{
|
||||
if (!ri.object)
|
||||
return;
|
||||
|
|
@ -53,6 +53,8 @@ void NavMeshSelectTool::on3DMouseDown(const Gui3DMouseEvent& evt)
|
|||
if (selNavMesh)
|
||||
{
|
||||
mCurEditor->selectMesh(selNavMesh);
|
||||
mSelMesh = selNavMesh;
|
||||
Con::executef(this, "onNavMeshSelected");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -68,7 +70,7 @@ void NavMeshSelectTool::on3DMouseMove(const Gui3DMouseEvent& evt)
|
|||
Point3F endPnt = evt.pos + evt.vec * 1000.0f;
|
||||
|
||||
RayInfo ri;
|
||||
if (gServerContainer.castRay(startPnt, endPnt, MarkerObjectType, &ri))
|
||||
if (gServerContainer.collideBox(startPnt, endPnt, MarkerObjectType, &ri))
|
||||
{
|
||||
NavMesh* selNavMesh = dynamic_cast<NavMesh*>(ri.object);
|
||||
if (selNavMesh)
|
||||
|
|
@ -90,6 +92,8 @@ void NavMeshSelectTool::onRender3D()
|
|||
{
|
||||
if (!mCurMesh.isNull())
|
||||
renderBoxOutline(mCurMesh->getWorldBox(), ColorI::LIGHT);
|
||||
if (!mSelMesh.isNull())
|
||||
renderBoxOutline(mSelMesh->getWorldBox(), ColorI::LIGHT);
|
||||
}
|
||||
|
||||
bool NavMeshSelectTool::updateGuiInfo()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue