GetProductsOnPhysicsFloor
This function returns an array of every product resting on the physics floor. This includes products that are touching products that are resting on the floor, and any products touching those products, and so on.
🔁 Function
Array GetProductsOnPhysicsFloor();
↩️ Return Value
Returns an array of Product objects or an empty array if none.
📝 Example
function LogAllProductsOnTheFloor()
{
let products = GetProductsOnPhysicsFloor();
LogDebug(`There are ${products.length} on the floor.`);
for (let i = 0; i < products.length; ++i)
{
LogDebug(`Product: ${products[i].Name}.`);
}
}