Blueprint question - locking to grid

We’d like to be able to use Rocket as our level/world editor. I know Rocket has the “Position Grid Snap” value but:

  1. It has no (obvious!) way to specify the exact value we want to use for our grid sizes
  2. It requires everybody in the team to make sure that they use the exact same values
  3. It seems to lose accuracy very quickly - which becomes more and more of an issue the further from origin we place objects

To deal with this I thought I’d create a new Construction Blueprint which I’ve simplified here:

The idea here is that the grid size is 2048. I’d expect that as I try and transform an object around the level it would divide the position by 2048 (removing the fraction) and then remultiply that position by 2048 - effectively locking the positions to a grid.

This works… but ONLY when you edit the transform using the property editor. If you use the mouse you get one of the following effects (depending on which relevant direction you drag the mouse):

  1. It doesn’t move
  2. It increases the position exponentially.

Since this is my first Construction Blueprint I am sure I’m doing something wrong. But the fact that it works through the property editor tells me that I’m not totally off-base so… can anybody help and tell me what I’m doing wrong? :slight_smile:

Hey Neil,

Thanks for your report! The best way to accomplish what you are wanting to do is to use the Position Grid Snap option. There is a list of Preset Grid Sizes, but there is also a User Defined list.

gridsnap1.jpg

The User Defined list can be customized by going to Edit > Editor Settings > General > Preferences > Snap (or simply search for “grid” in the Preferences). Here you can expand Grid Sizes and change any of the sizes to the number you want.

gridsnap2.jpg

Once you have modified this setting, you can then go back to the Position Grid Snap option and see your new User Defined Grid Size.

gridsnap3.jpg

Each person working in your project will need to make this change in their Editor Preferences, but that should have everyone working on your desired Grid Size.

Please let us know if you have any additional questions!

Thanks!

-Steve

Thanks Steve, I really appreciate the guide. :slight_smile:

This doesn’t appear to address the issue of accuracy though - the floating point position values quickly start to drift as I transform objects throughout the level. Is this an editor issue?

Hey Neil,

It looks like your team has opened a new question for the floating point issue you are seeing, which is perfect! We want to keep big questions and issues that arise from your use separated into individual questions/threads. Here is the link to the other question for anyone else that’s curious: https://rocket.unrealengine.com/questions/11615/bug-accumulation-of-large-floating-point-errors-wh.html

Thanks!

-Steve