Get Position: Difference between revisions

From Fancade Wiki
m (Add Related Section)
(More accurate description)
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
}}
}}


Given an object, outputs its position and rotation.
Given an object, outputs its position and rotation. Specifically, it gives the position of the object's center of mass.
If the input is unwired, outputs the position of the block itself (or the block it is inside).


Specifically, it gives the position of the object's center of mass.
== Notes ==
 
If the input is unwired, output the geometric center of the object it is contained instead, or itself otherwise.
The geometric center is calculated in terms of ''voxels'' instead of blocks, or in other words, the center of the most minimum rectangle that contains every ''voxel'' of said object.
 
Additional calculations are needed to arrive at the [[geometric center of an object]] (in terms of blocks).


== Related ==
== Related ==

Latest revision as of 14:43, 19 December 2024

Get Position
Get Position.png
TypeScript block
ColliderNone
FolderObjects
Ports
Inputs Object
Outputs Position
Rotation

Given an object, outputs its position and rotation. Specifically, it gives the position of the object's center of mass.

Notes

If the input is unwired, output the geometric center of the object it is contained instead, or itself otherwise. The geometric center is calculated in terms of voxels instead of blocks, or in other words, the center of the most minimum rectangle that contains every voxel of said object.

Additional calculations are needed to arrive at the geometric center of an object (in terms of blocks).

Related