sensor cannot work normally
I meet a simple but truly strange problem.In the picture below,I‘m using a sensor to detect if something pass through.However,even I have put the Steuerschrank into MU layer,my sensor cannot detect it.In other occasion,I use the prefab--cans,this sensor could work normally.someone could help me?I have spend nearly one week on this problem.
Answer
oh my!thanks !I thought only when I turn off the “use raycast” property ,I have to add a collider component.
With a Raycast based Sensor you don't need to use colliders but you need to define the layers where the Raycast is sending to. It is the same Layer as the Sensor is and additional Layers which you can define.
For a non Raycast (Box Collider) based Sensor - the Sensor should be normally on the layer rvSensor. Please also check the doc information about the collsission matrix for colliders.
I just try again,still need a collider.if not,even my sensor and my object are both on the right layer--like the mu layer, my sensor cannot detect this object.
A sensor (using raycasts) does not need to have colliders because collision is detected by the raycast the sensor is sending out. But the objects which have to be detected need to have a collider.
More info for collision detection in Unity:
Customer support service by UserEcho
With a Raycast based Sensor you don't need to use colliders but you need to define the layers where the Raycast is sending to. It is the same Layer as the Sensor is and additional Layers which you can define.
For a non Raycast (Box Collider) based Sensor - the Sensor should be normally on the layer rvSensor. Please also check the doc information about the collsission matrix for colliders.