News Forums RAIN General Discussion and Troubleshooting Setting the sensor range in RAIN 2

Tagged: 

This topic contains 6 replies, has 4 voices, and was last updated by  RyanMitchellGames 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27550

    Drum
    Participant

    Hi, I’m probably missing the obvious, but how does one set the sensor range in RAIN 2? I only have options for the horizontal and vertical angles, but nothing for range. For that matter, how does one size the AI generally?

    • This topic was modified 1 year ago by  Drum.
    #27554

    Drum
    Participant

    No worries, I found it :)

    #27555

    CodersExpo
    Participant

    Cool good job! For others with the same question, you have to get the ai sensor and cast it to the type it is. This example gets the visual sensor by name.

    ((RAIN.Perception.Sensors.VisualSensor)ai.Senses.GetSensor(“SensorName”)).Range;

    #31052

    dhageuk
    Participant

    Hi,

    Can you please explain/show to do it?

    Im new to rain.

    Cheers!

    • This reply was modified 1 year ago by  dhageuk.
    #31054

    dhageuk
    Participant

    Found it. Just enable advanced settings :)

    #35731

    RyanMitchellGames
    Participant

    Yes thanks for posting the solution it saved me quite a bit of time. Any API takes time to understand a design pattern.

    Thanks!

    #35732

    RyanMitchellGames
    Participant

    I might add to this for others.. I would set this after instantiating a prefab and adding it as a child… after that the defaults were restored and my settings gone. So I had to do this at a later start in my procedure. Just an FYI that could save others time. Not sure I have it in the right place still but it is currently working…

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

You must be logged in to reply to this topic.