Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local controllerSide = sensors.getController()
- print( controllerSide )
- local sensorName = "Sensor"
- print( sensorName )
- local WorldProbe = sensors.getProbes( controllerSide, sensorName )[1]
- local targets = sensors.getAvailableTargetsforProbe(controllerSide, sensorName, WorldProbe)
- local data = {}
- for k,v in pairs( targets ) do
- table.insert( data, sensors.getSensorReadingAsDict( controllerSide, sensorName, v, WorldProbe ) )
- end
- for k,entity in pairs( data ) do
- if entity.name == "vq" then
- print( "Name:"..entity.name )
- print( "X: "..entity.xCoord )
- print( "Y: "..entity.yCoord )
- print( "Z: "..entity.zCoord )
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement