Get Size: Difference between revisions

From Fancade Wiki
No edit summary
m (Add links)
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
}}
}}
Outputs the size of an object as min and max.
Outputs the size of an object as min and max.
If the inputs are left unwired, outputs the size of the world.
If the inputs are left unwired, outputs the size of the world.


Line 21: Line 22:
: [[File:Get size example2.png|thumb|none|Geometric size]]
: [[File:Get size example2.png|thumb|none|Geometric size]]


== Example ==
See [[Geometric center of an object]].
== Related ==


* [[Get Position]]


[[Category:Blocks]]
[[Category:Blocks]]

Latest revision as of 14:33, 27 June 2024

Get Size
Get Size.png
TypeScript block
ColliderNone
FolderObjects
Ports
Inputs Object
Outputs Min
Max

Outputs the size of an object as min and max.

If the inputs are left unwired, outputs the size of the world.

Notes

  • The size output is based on the number of cubic "block spaces" the object occupies in the level editor, not the actual number of filled-in voxels.
So an 8x8x8 cube of voxels (completely filling one block space) and a tiny 1x1x1 cube of voxels (a single voxel) will both show the same size of (-0.5, -0.5, -0.5) min and (0.5, 0.5, 0.5) max.
  • By default, the Get Size block outputs the volumetric size of an object (the distances from the center to the edges):
Volumetric size
To get the geometric size of an object (the total distance from one edge to the other) use this simple method:
Geometric size

Example

See Geometric center of an object.

Related