PhysicsPESensor: OnProductBlocking
Invoked when a product blocks the beam that wasn’t blocking it previously.
Note: OnProductBlocking does not support multiple subscriptions. Only the most recent subscription will be called.
Event
void xxxxxxxxxxxxxxxxx(sender: PhysicsPESensor, product: Product);
Parameters
Name | Type | Description |
---|---|---|
sender | PhysicsPESensor | The sensor that is being blocked. |
product | Product | The product that is blocking the sensor. |
Example
function OnSimulationStart()
{
SubscribeAll("OnProductBlocking", "Physics PE Sensor", OnProductBlocking);
}
function OnProductBlocking(sensor, product)
{
LogDebug(`${sensor.Name} blocked by ${product.Name}.`);
}