News Forums RAIN General Discussion and Troubleshooting How Change the Sensor Range by Code

This topic contains 4 replies, has 2 voices, and was last updated by  prime 1 year, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8676

    Yaguz
    Participant

    Hello, anyone knows how to change the sensor range by code?

    Thx!

    #8934

    prime
    Keymaster
    VisualSensor sensor = ai.Senses.GetSensor("Sensor Name") as VisualSensor;
    sensor.Range = 100f;
    #9846

    Yaguz
    Participant

    Hi! Thx for the answer! But i cant access the type VisualSensor.
    Do I have to add any kind of library?I’m only using:

    using UnityEngine;
    using System.Collections;
    using System.Collections.Generic;
    using RAIN.Core;
    using RAIN.Action;

    Thx!

    #9953

    prime
    Keymaster

    using RAIN.Perception;
    using RAIN.Perception.Sensors;

    #9954

    prime
    Keymaster

    using RAIN.Perception;
    using RAIN.Perception.Sensors;

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.