| Blockland Forums > Modification Help |
| Spawn brick aligned to grid help |
| << < (2/2) |
| Ipquarx:
--- Quote from: Treynolds416 on April 07, 2012, 08:04:46 AM ---Bricks automatically align themselves to the brickgrid. If I told torque to plant a 4x cube at "440.564 525.64 467.367", a new 4x cube would appear at "440.5 525.5 467.4" --- End quote --- I thought torque rounded it to the nearest .5 ... But yes, it does automatically allign to the grid. |
| Port:
--- Quote from: Ipquarx on April 07, 2012, 01:52:40 PM ---I thought torque rounded it to the nearest .5 ... But yes, it does automatically allign to the grid. --- End quote --- X and Y are rounded to the nearest half of a unit, and Z is rounded to the nearest sixth? of a unit. --- Quote from: Nexus on April 07, 2012, 03:08:41 AM ---do you want it to be a perfect circle around the player or is a box/diamond okay? --- End quote --- How would a perfect circle be a problem anyway? vectorDist( vec1, vec2 ). |
| Treynolds416:
--- Quote from: Port on April 07, 2012, 02:47:40 PM ---X and Y are rounded to the nearest half of a unit, and Z is rounded to the nearest sixth? of a unit. --- End quote --- Not exactly, it depends on the brick. If I planted a 2x2 brick somewhere it would be placed at either n.5 or n.0. Conversely, if I planted a 1x1 brick some where it would be at either n.25 or n.75. Height also matters. A baseplate's z position will be rounded to the nearest tenth, while a cube would be rounded to the nearest fifth. This is because the position of a brick is always it's centroid. Imagine for a second, a solid cube of invisible 1x1 plates, and you have your wrench out. Every vertical line will fall on a multiple of 0.5, and every horizontal line will fall on a multiple of 0.2. The position of the brick is not necessarily on one of these lines. For example, the four corners of a 1x1 brick could be at (0, 0), (0, 0.5), (0.5, 0), and (0.5, 0.5). The xy position of the brick in this case is (0.25, 0.25). |
| Nexus:
--- Quote from: Treynolds416 on April 07, 2012, 03:09:27 PM ---Not exactly, it depends on the brick. If I planted a 2x2 brick somewhere it would be placed at either n.5 or n.0. Conversely, if I planted a 1x1 brick some where it would be at either n.25 or n.75. Height also matters. A baseplate's z position will be rounded to the nearest tenth, while a cube would be rounded to the nearest fifth. This is because the position of a brick is always it's centroid. Imagine for a second, a solid cube of invisible 1x1 plates, and you have your wrench out. Every vertical line will fall on a multiple of 0.5, and every horizontal line will fall on a multiple of 0.2. The position of the brick is not necessarily on one of these lines. For example, the four corners of a 1x1 brick could be at (0, 0), (0, 0.5), (0.5, 0), and (0.5, 0.5). The xy position of the brick in this case is (0.25, 0.25). --- End quote --- This kind of stuff gave me nightmares while trying to make BuildBot account for it |
| Treynolds416:
I can certainly imagine |
| Navigation |
| Message Index |
| Previous page |