mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
adds a useGroupCenter var/button to allow folks to use non-itterative snapping, and defaults it to do so (maintains prior functionality envelope)
This commit is contained in:
parent
7d2315c781
commit
ebdd441833
4 changed files with 33 additions and 5 deletions
|
|
@ -1805,7 +1805,7 @@ WorldEditor::WorldEditor()
|
|||
mSoftSnapDebugPoint.set(0.0f, 0.0f, 0.0f);
|
||||
|
||||
mGridSnap = false;
|
||||
|
||||
mUseGroupCenter = true;
|
||||
mFadeIcons = true;
|
||||
mFadeIconsDist = 8.f;
|
||||
}
|
||||
|
|
@ -2254,7 +2254,7 @@ void WorldEditor::on3DMouseDragged(const Gui3DMouseEvent & event)
|
|||
mGizmo->getProfile()->snapToGrid = snapToGrid;
|
||||
}
|
||||
|
||||
mSelected->offset(mGizmo->getOffset(), mGridSnap ? mGridPlaneSize : 0.f);
|
||||
mSelected->offset(mGizmo->getOffset(), (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f);
|
||||
|
||||
// Handle various sticking
|
||||
terrainSnapSelection( mSelected, event.modifier, mGizmo->getPosition() );
|
||||
|
|
@ -2686,7 +2686,8 @@ void WorldEditor::initPersistFields()
|
|||
addGroup( "Grid" );
|
||||
|
||||
addField( "gridSnap", TypeBool, Offset( mGridSnap, WorldEditor ),
|
||||
"If true, transform operations will snap to the grid." );
|
||||
"If true, transform operations will snap to the grid.");
|
||||
addField("useGroupCenter", TypeBool, Offset(mUseGroupCenter, WorldEditor));
|
||||
|
||||
endGroup( "Grid" );
|
||||
|
||||
|
|
|
|||
|
|
@ -349,6 +349,7 @@ class WorldEditor : public EditTSCtrl
|
|||
F32 mDropAtScreenCenterMax;
|
||||
|
||||
bool mGridSnap;
|
||||
bool mUseGroupCenter;
|
||||
bool mStickToGround;
|
||||
bool mStuckToGround; ///< Selection is stuck to the ground
|
||||
AlignmentType mTerrainSnapAlignment; ///< How does the stickied object align to the terrain
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue