2 agents using the same stacked sensor

I have a setup where my raced AI has 2 agents 1 driver & 1 navigator, I want both of them to use the same raycast stacked sensor to save performance, is there a way to tell the agent which sensors to use instead of using the automatic “use child sensors” ?

Are you sure that your raycast sensor is a performance bottleneck? I think raycasts are pretty fast. I’d expect the neural network is the main performance bottleneck?

its my own custom sensor, there are 4 cones casting a total of 42 rays & I have 20+ agents, so it adds up, the sensor main performance hit is mainly producing the cones & rotating them to the agent orientation, so if I can save that it would help a bit, trying to squeez as much as I can

what if you use GetComponentFromChildren or similar to get hold of the RayPerceptionSensor object, and then call Write, on that, passing in the ObservationWriter? Once you’ve got hold of this object from one of your own objects, I imagine you should be able to pass the object to other of your objects fairly easily?

You could use Raycast Command, that is very fast.