Sensor toolkit integration

Kaizen

New member
Hi, I was trying the Sensor toolkit integration and as I can't find any documentation I'm wondering if there is any special setup to make it work.

I'd like to use the sensor get nearest task instead of the Can see object one used in the Character Controller demo behavior.

At the top of my behavior I get and store the sensor object (working, no problem):

Capture.PNG

Then I replace the Can See task by the Sensor Get Nearest task (error on play, Original error line is 43, not 45):
Capture2.PNG
Capture3.PNG

I don't know if this is a bug or if my setup is wrong but if I add in SensorGetNearest.cs line 39 the same test as in SensorGetDetected.cs line 39 then it works

C#:
public override TaskStatus OnUpdate()
{
    if (!UpdateCache(GetDefaultGameObject(target.Value))) return TaskStatus.Failure;
    // Following code not changed...

So my questions are:
  • Is it a bug or is my setup wrong?
  • Can we have a small documentation page for the integration?
Thanks!
 
Thanks for debugging it! Your change looks good and I'll update the integration.

These tasks were created based off of the Sensor Toolkit Playmaker integration. It should just be a matter of adding the task and you're done after you've setup Sensor Toolkit.
 
Top