====== COMP_ENFORCE_RECTANGLE ====== **Category**: Component\\ **Mod Dependency**: [[https://foundation.mod.io/foundation-ebf|Foundation EBF]] Parent class: [[api:component|COMPONENT]] ===== Properties ===== ---- ==== Rectangle ==== * **Type**: ''vec2f'' * **Default value**: ''{1, 1}'' ---- ==== Enforcer ==== //Runtime only// * **Type**: ''[[api:game_object|GAME_OBJECT]]'' * **Default value**: ''nil'' ===== Functions ===== ---- ==== setEnforcer ==== ''void **setEnforcer**(//gameObject//)'' ^ Name ^ Type ^ Description ^ | //''gameObject''// | ''[[api:game_object|GAME_OBJECT]]'' | The centre of the rectangle | ==== getPosition ==== ''vec3f **getPosition**()'' Returns a uniformly distributed random position within the specified rectangle in 2 dimensions