Grid Snap in the editor?
by Mitovo · in Torque Game Engine · 04/16/2004 (8:52 am) · 3 replies
Hey all..
Quick question..
Is there a way to enable grid-snap in the TG editor? I know that when you're painting textures, your brush is snapped to the vertices.. However, how about for placing DTS or DIF objects? Is there a "control-key" that can be pressed, or some mode that allows you to snap to a grid?
The type of project I have in the works requires that kind of precision when placing the game objects and having a way to snap everything to a grid would be a *major* help..
Thanks!
Mike
Quick question..
Is there a way to enable grid-snap in the TG editor? I know that when you're painting textures, your brush is snapped to the vertices.. However, how about for placing DTS or DIF objects? Is there a "control-key" that can be pressed, or some mode that allows you to snap to a grid?
The type of project I have in the works requires that kind of precision when placing the game objects and having a way to snap everything to a grid would be a *major* help..
Thanks!
Mike
About the author
#2
Hey there.. Thank you for that!
I have it set up and working now in the editor.. I just can't figure out how to get it to work.. heh. Nothing seems to be snapping to anything else.
Do you move the object into position, *then* select a snap option.. or.. do you select the snap option with an object selected and *then* start to move it? I can't seem to figure it out..
Anyway.. thanks again!
Mike
04/16/2004 (3:09 pm)
Stefan,Hey there.. Thank you for that!
I have it set up and working now in the editor.. I just can't figure out how to get it to work.. heh. Nothing seems to be snapping to anything else.
Do you move the object into position, *then* select a snap option.. or.. do you select the snap option with an object selected and *then* start to move it? I can't seem to figure it out..
Anyway.. thanks again!
Mike
#3
Apparently (at least in the HEAD version) the WorldEditorSettings HAS options to expose the editor's snap-to-grid (and handy snap-rotation-to-angle) functionality, but they're hidden! If you bring up the GUI editor (F10) while in the World Editor mode, and select 'WorldEditorSettingsDlg' from the middle drop-down (between 'New Control' and '640 x 480') you can edit this and make it show.
Once the WorldEditor Settings dialog is displayed in the GUI editor, expand the 'WorldEditorSettingsDlg - GuiControl' tree on the right side of the screen. Drill down until you see the WESettingsSnapTab and click on it to select it.
You'll notice in the attributes that this panel is not visible, so click the 'visible' check box and click 'Apply.' You might have to also select 'Bring to Front' in the Layout drop-down menu. You'll see that it is positioned right over the other areas so you'll have to move it (and probably stretch out the main Settings window to fit it.) You can also change the profile to GuiWindowProfile to make it look like the rest of the window too if you wish.
After you have it positioned, save the Gui and you're set. Leave the Gui editor (F10) and access the WorldEditor Settings from the 'Edit' menu to turn things on and off. Note that the using the axes to move the item does NOT snap to the grid; only the free-form planar movement does this.
To answer your second question about the snapping resource, you have to select the two items you want to snap together. First select the object you want to snap to (i.e. the object that won't move). Then using shift-click, select the item you want to snap to the first. Then pick your desired snap function.
Be aware that the snap stuff only works with objects that haven't been rotated. I've also expanded some of the SnapTo functionality (see the comments in the resource) to do multi-axes alignment as well as simple all-in-one clone/snap functionality. There's some efforts happening to fix the problem with rotated objects, but it isn't completely fixed yet.
Luke
07/10/2004 (12:22 pm)
Just thought I'd chime in (since I just found the snap-to-grid myself). Apparently (at least in the HEAD version) the WorldEditorSettings HAS options to expose the editor's snap-to-grid (and handy snap-rotation-to-angle) functionality, but they're hidden! If you bring up the GUI editor (F10) while in the World Editor mode, and select 'WorldEditorSettingsDlg' from the middle drop-down (between 'New Control' and '640 x 480') you can edit this and make it show.
Once the WorldEditor Settings dialog is displayed in the GUI editor, expand the 'WorldEditorSettingsDlg - GuiControl' tree on the right side of the screen. Drill down until you see the WESettingsSnapTab and click on it to select it.
You'll notice in the attributes that this panel is not visible, so click the 'visible' check box and click 'Apply.' You might have to also select 'Bring to Front' in the Layout drop-down menu. You'll see that it is positioned right over the other areas so you'll have to move it (and probably stretch out the main Settings window to fit it.) You can also change the profile to GuiWindowProfile to make it look like the rest of the window too if you wish.
After you have it positioned, save the Gui and you're set. Leave the Gui editor (F10) and access the WorldEditor Settings from the 'Edit' menu to turn things on and off. Note that the using the axes to move the item does NOT snap to the grid; only the free-form planar movement does this.
To answer your second question about the snapping resource, you have to select the two items you want to snap together. First select the object you want to snap to (i.e. the object that won't move). Then using shift-click, select the item you want to snap to the first. Then pick your desired snap function.
Be aware that the snap stuff only works with objects that haven't been rotated. I've also expanded some of the SnapTo functionality (see the comments in the resource) to do multi-axes alignment as well as simple all-in-one clone/snap functionality. There's some efforts happening to fix the problem with rotated objects, but it isn't completely fixed yet.
Luke
Associate Stefan Beffy Moises
tork.beffy.de/tge_snipits/view_snipits_in_category.php?fk_tge_snipit_category_id...